mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
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:
parent
e2a936d2ae
commit
9b09073259
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user