From: Joao Eduardo Luis Date: Fri, 29 Mar 2013 15:28:51 +0000 (+0000) Subject: mon: Monitor: check if 'pss' arg is !NULL on parse_pos_long() X-Git-Tag: v0.62~126^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b09073259f2eb88c0aa13d2c9cce4b7e550e452;p=ceph.git mon: Monitor: check if 'pss' arg is !NULL on parse_pos_long() We already do it all throughout the function, but this one place didn't. Signed-off-by: Joao Eduardo Luis --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index e2015456dcdc..d8d4579f67b1 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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; }