]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Monitor: check if 'pss' arg is !NULL on parse_pos_long()
authorJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 29 Mar 2013 15:28:51 +0000 (15:28 +0000)
committerSage Weil <sage@inktank.com>
Fri, 29 Mar 2013 23:47:29 +0000 (16:47 -0700)
We already do it all throughout the function, but this one place didn't.

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

index e2015456dcdcdda2aeb15e03d4fe6e08dfd0e751..d8d4579f67b1d6935253a0f80741e581481df90b 100644 (file)
@@ -93,7 +93,8 @@ const string Monitor::MONITOR_STORE_PREFIX = "monitor_store";
 long parse_pos_long(const char *s, ostream *pss)
 {
   if (*s == '-' || *s == '+') {
-    *pss << "expected numerical value, got: " << s;
+    if (pss)
+      *pss << "expected numerical value, got: " << s;
     return -EINVAL;
   }