summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-06-08 23:17:30 +0000
committerngie <ngie@FreeBSD.org>2016-06-08 23:17:30 +0000
commitab7650d5cbd178dbab99612d9bfb3818fcf24c0c (patch)
tree96b6795e600631a7ba60150db2cd252fa49207e5 /lib/libc/rpc
parent05e9e0ac08072bb156c684c9cadbd22fc858f7ce (diff)
downloadFreeBSD-src-ab7650d5cbd178dbab99612d9bfb3818fcf24c0c.zip
FreeBSD-src-ab7650d5cbd178dbab99612d9bfb3818fcf24c0c.tar.gz
Test for strchr(3) returning NULL, not 0
MFC after: 3 days Reported by: coccinelle Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc/rpc')
-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 ce2984b..8d31136 100644
--- a/lib/libc/rpc/getnetpath.c
+++ b/lib/libc/rpc/getnetpath.c
@@ -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 */
OpenPOWER on IntegriCloud