diff options
author | araujo <araujo@FreeBSD.org> | 2016-04-18 07:40:36 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-04-18 07:40:36 +0000 |
commit | ebd15428b53018b5ab0e8d1fdcba7bfd016dd3b9 (patch) | |
tree | 2aab2ff62838b39ca6769da18ae0cb4442ea1aa8 | |
parent | 1852c3675cd08e58d07e956f9023f5b3eee5ca3c (diff) | |
download | FreeBSD-src-ebd15428b53018b5ab0e8d1fdcba7bfd016dd3b9.zip FreeBSD-src-ebd15428b53018b5ab0e8d1fdcba7bfd016dd3b9.tar.gz |
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.
-rw-r--r-- | sbin/bsdlabel/bsdlabel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index b99c279..072c4cf 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -781,7 +781,7 @@ getasciilabel(FILE *f, struct disklabel *lp) 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) |