summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-06-11 01:37:59 +0000
committerngie <ngie@FreeBSD.org>2016-06-11 01:37:59 +0000
commit836f6cf130b3c379c1146adf201487fe83ac1622 (patch)
tree8ce508e4d31e97d61ae5211dd44d1d3464a43be1 /lib/libc
parent0c9eaf192ac2599f05b45f55ee190fc9fab693df (diff)
downloadFreeBSD-src-836f6cf130b3c379c1146adf201487fe83ac1622.zip
FreeBSD-src-836f6cf130b3c379c1146adf201487fe83ac1622.tar.gz
MFC r301704:
Test for strchr(3) returning NULL, not 0
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/rpc/getnetpath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/rpc/getnetpath.c b/lib/libc/rpc/getnetpath.c
index 29155c7..f68345c 100644
--- a/lib/libc/rpc/getnetpath.c
+++ b/lib/libc/rpc/getnetpath.c
@@ -264,7 +264,7 @@ int token; /* char to parse string for */
*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 */
OpenPOWER on IntegriCloud