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)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to