]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CephBroker.cc: fix condition 76/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 26 Feb 2013 18:51:03 +0000 (19:51 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 26 Feb 2013 18:51:03 +0000 (19:51 +0100)
from cppcheck:
 Fix Suspicious condition (assignment + comparison); Clarify
 expression with parentheses.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/hypertable/CephBroker.cc

index 96fd4830ec218121917688942a592aa4e3e70ff5..a6cf6da1daacf7248bb0dcd50e4c53b14174d90e 100644 (file)
@@ -386,7 +386,7 @@ int CephBroker::rmdir_recursive(const char *directory) {
   struct dirent de;
   struct stat st;
   int r;
-  if ((r = ceph_opendir(cmount, directory, &dirp) < 0))
+  if ((r = ceph_opendir(cmount, directory, &dirp)) < 0)
     return r; //failed to open
   while ((r = ceph_readdirplus_r(cmount, dirp, &de, &st, 0)) > 0) {
     String new_dir = de.d_name;