]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common/obj_bencher: silence divide by zero warning
authorKefu Chai <kchai@redhat.com>
Fri, 28 Apr 2017 06:02:52 +0000 (14:02 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 28 Apr 2017 06:17:54 +0000 (14:17 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/obj_bencher.cc

index 701a4b5ad0ee9daa744c90ee3473897adf43e252..32b0abe92352a27d49324d47a2cc0ce4dc5e4536 100644 (file)
@@ -1176,7 +1176,9 @@ int ObjBencher::clean_up(int num_objects, int prevPid, int concurrentios) {
   lock.Unlock();
 
   // don't start more completions than files
-  if (num_objects < concurrentios) {
+  if (num_objects == 0) {
+    return 0;
+  } else if (num_objects < concurrentios) {
     concurrentios = num_objects;
   }