]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
adminsocket: change failure test
authorSage Weil <sage@inktank.com>
Fri, 28 Sep 2012 01:02:45 +0000 (18:02 -0700)
committerSage Weil <sage@inktank.com>
Fri, 28 Sep 2012 20:18:04 +0000 (13:18 -0700)
This makes coverity happier:

CID 716941: Using invalid iterator (INVALIDATE_ITERATOR)
At (35): Dereferencing iterator "p" though it is already past the end of its container.

only because it doesn't understand all the side-effects of the failure
branch above.

Signed-off-by: Sage Weil <sage@inktank.com>
src/common/admin_socket.cc

index c999c89864342be2a8d53fbc7b969f28f5c35196..6cf0773eb399df4e573a542f5f0487a7390f0693 100644 (file)
@@ -331,7 +331,7 @@ bool AdminSocket::do_accept()
   }
 
   bufferlist out;
-  if (match.size() == 0) {
+  if (p == match.end()) {
     lderr(m_cct) << "AdminSocket: request '" << c << "' not defined" << dendl;
   } else {
     string args;