Date: Wed, 8 Jun 2016 23:17:30 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301704 - head/lib/libc/rpc Message-ID: <201606082317.u58NHU4e061734@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Jun 8 23:17:30 2016 New Revision: 301704 URL: https://svnweb.freebsd.org/changeset/base/301704 Log: Test for strchr(3) returning NULL, not 0 MFC after: 3 days Reported by: coccinelle Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/rpc/getnetpath.c Modified: head/lib/libc/rpc/getnetpath.c ============================================================================== --- head/lib/libc/rpc/getnetpath.c Wed Jun 8 23:13:20 2016 (r301703) +++ head/lib/libc/rpc/getnetpath.c Wed Jun 8 23:17:30 2016 (r301704) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606082317.u58NHU4e061734>