mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Test for strchr(3) returning NULL, not 0
MFC after: 3 days Reported by: coccinelle Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
aaad73f447
commit
3304ba9d70
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301704
@ -262,7 +262,7 @@ _get_next_token(char *npp, int token)
|
||||
*cp++ = '\0'; /* null-terminate token */
|
||||
/* get rid of any backslash escapes */
|
||||
ep = npp;
|
||||
while ((np = strchr(ep, '\\')) != 0) {
|
||||
while ((np = strchr(ep, '\\')) != NULL) {
|
||||
if (np[1] == '\\')
|
||||
np++;
|
||||
strcpy(np, (ep = &np[1])); /* XXX: overlapping string copy */
|
||||
|
Loading…
Reference in New Issue
Block a user