svn commit: r298193 - head/sbin/bsdlabel
Marcelo Araujo
araujo at FreeBSD.org
Mon Apr 18 07:40:37 UTC 2016
Author: araujo
Date: Mon Apr 18 07:40:36 2016
New Revision: 298193
URL: https://svnweb.freebsd.org/changeset/base/298193
Log:
Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the
string.
MFC after: 2 weeks.
Modified:
head/sbin/bsdlabel/bsdlabel.c
Modified: head/sbin/bsdlabel/bsdlabel.c
==============================================================================
--- head/sbin/bsdlabel/bsdlabel.c Mon Apr 18 07:36:24 2016 (r298192)
+++ head/sbin/bsdlabel/bsdlabel.c Mon Apr 18 07:40:36 2016 (r298193)
@@ -781,7 +781,7 @@ getasciilabel(FILE *f, struct disklabel
lp->d_sbsize = 0; /* XXX */
while (fgets(line, sizeof(line) - 1, f)) {
lineno++;
- if ((cp = strchr(line,'\n')) != 0)
+ if ((cp = strchr(line,'\n')) != NULL)
*cp = '\0';
cp = skip(line);
if (cp == NULL)
More information about the svn-src-head
mailing list