]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: OSDMonitor: drop cmdval_get() for unused variable
authorJoao Eduardo Luis <joao.luis@inktank.com>
Tue, 19 Nov 2013 23:21:11 +0000 (23:21 +0000)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 22 Nov 2013 02:48:54 +0000 (02:48 +0000)
We don't ever use any value as a float, so just drop obtaining it.  This
makes it easier to partially revert 2fe0d0d9 in an upcoming patch.

Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/mon/OSDMonitor.cc

index 9aabce9a8c757d39b7ac8ecb63f5081fe8cc2a64..284650f01da98577ba4233e95ba025934716a04b 100644 (file)
@@ -2749,7 +2749,7 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
   if (pending_inc.new_pools.count(pool))
     p = pending_inc.new_pools[pool];
 
-  // accept val as a json string or int, and parse out int or float
+  // accept val as a json string or int, and parse out int
   // values from the string as needed
   string val;
   cmd_getval(g_ceph_context, cmdmap, "val", val);
@@ -2757,10 +2757,6 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
   int64_t n = 0;
   if (!cmd_getval(g_ceph_context, cmdmap, "val", n))
     n = strict_strtoll(val.c_str(), 10, &interr);
-  string floaterr;
-  float f;
-  if (!cmd_getval(g_ceph_context, cmdmap, "val", f))
-    f = strict_strtod(val.c_str(), &floaterr);
 
   if (var == "size") {
     if (interr.length()) {