Commit 689a90a6 by Serge Hallyn Committed by Stéphane Graber

coverity: null check after dereference

we actually meant to check *p not p. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 528e479a
...@@ -3768,7 +3768,7 @@ static char *get_field(char *src, int nfields) ...@@ -3768,7 +3768,7 @@ static char *get_field(char *src, int nfields)
for (i = 0; i < nfields; i++) { for (i = 0; i < nfields; i++) {
while (*p && *p != ' ' && *p != '\t') while (*p && *p != ' ' && *p != '\t')
p++; p++;
if (!p) if (!*p)
break; break;
p++; p++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment