NULL is a pointer, not string terminator
Replace some instances of NULL to '\0', when referring to string terminator.
This commit is contained in:
committed by
Jon Trulson
parent
3b06b6a6b7
commit
706fccb50e
@@ -318,7 +318,7 @@ _csa_iso8601_to_duration(char *buf, time_t *sec)
|
||||
numptr = ptr;
|
||||
while (*ptr >= '0' && *ptr <= '9') ptr++;
|
||||
|
||||
if (numptr == ptr || !(*ptr && *ptr++ == 'S' && *ptr == NULL))
|
||||
if (numptr == ptr || !(*ptr && *ptr++ == 'S' && *ptr == '\0'))
|
||||
return (-1);
|
||||
else {
|
||||
num = atoi(numptr);
|
||||
|
||||
Reference in New Issue
Block a user