summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-04-18 05:26:32 +0000
committeraraujo <araujo@FreeBSD.org>2016-04-18 05:26:32 +0000
commit0bd7ac2f20a043ce7a134de7a12c36437eb2c977 (patch)
tree3f324dea5ed04fb07c6e4a01e436b6766452552f /usr.bin
parent25333787db7b96c565f826f86cb864488835861f (diff)
downloadFreeBSD-src-0bd7ac2f20a043ce7a134de7a12c36437eb2c977.zip
FreeBSD-src-0bd7ac2f20a043ce7a134de7a12c36437eb2c977.tar.gz
Use NULL instead of 0.
strtok(3) will return NULL when no more tokens remain. MFC after: 2 weeks.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/login/login_fbtab.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c
index 8faee56..f4f0516 100644
--- a/usr.bin/login/login_fbtab.c
+++ b/usr.bin/login/login_fbtab.c
@@ -96,15 +96,15 @@ login_fbtab(char *tty, uid_t uid, gid_t gid)
while (fgets(buf, sizeof(buf), fp)) {
if ((cp = strchr(buf, '#')))
*cp = 0; /* strip comment */
- if ((cp = devname = strtok(buf, WSPACE)) == 0)
+ if ((cp = devname = strtok(buf, WSPACE)) == NULL)
continue; /* empty or comment */
if (strncmp(devname, _PATH_DEV, sizeof _PATH_DEV - 1) != 0
- || (cp = strtok(NULL, WSPACE)) == 0
+ || (cp = strtok(NULL, WSPACE)) == NULL
|| *cp != '0'
|| sscanf(cp, "%o", &prot) == 0
|| prot == 0
|| (prot & 0777) != prot
- || (cp = strtok(NULL, WSPACE)) == 0) {
+ || (cp = strtok(NULL, WSPACE)) == NULL) {
syslog(LOG_ERR, "%s: bad entry: %s", table, cp ? cp : "(null)");
continue;
}
OpenPOWER on IntegriCloud