mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
string2ll(): test for NULL pointer in all the cases.
This commit is contained in:
parent
9a375e5408
commit
1daee8c748
@ -369,7 +369,7 @@ int string2ll(const char *s, size_t slen, long long *value) {
|
||||
v = p[0]-'0';
|
||||
p++; plen++;
|
||||
} else if (p[0] == '0' && slen == 1) {
|
||||
*value = 0;
|
||||
if (value != NULL) *value = 0;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user