]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: check size must larger than zero. 3315/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Tue, 13 Jan 2015 03:49:19 +0000 (11:49 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Tue, 13 Jan 2015 06:27:36 +0000 (14:27 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/mon/OSDMonitor.cc

index 6f4ce931ebdea941ef47f3c2ca819f3e08f3c2fd..be39642b8d49685b8dee8795448110a513ba95e8 100644 (file)
@@ -3860,7 +3860,7 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
       ss << "error parsing integer value '" << val << "': " << interr;
       return -EINVAL;
     }
-    if (n == 0 || n > 10) {
+    if (n <= 0 || n > 10) {
       ss << "pool size must be between 1 and 10";
       return -EINVAL;
     }