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 <joao.luis@inktank.com>
This commit is contained in:
Joao Eduardo Luis 2013-03-29 15:28:51 +00:00 committed by Sage Weil
parent e2a936d2ae
commit 9b09073259

View 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;
}