diff options
author | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
commit | c2ee1dcc02035d781d6c70f06df7106979a9f870 (patch) | |
tree | 757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /usr.bin/login | |
parent | c174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff) | |
download | FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz |
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'usr.bin/login')
-rw-r--r-- | usr.bin/login/login_fbtab.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c index 846033c..e0b99e3 100644 --- a/usr.bin/login/login_fbtab.c +++ b/usr.bin/login/login_fbtab.c @@ -66,6 +66,7 @@ #include <string.h> #include <errno.h> #include <dirent.h> +#include <paths.h> #include <unistd.h> #include "pathnames.h" @@ -98,7 +99,7 @@ gid_t gid; *cp = 0; /* strip comment */ if ((cp = devname = strtok(buf, WSPACE)) == 0) continue; /* empty or comment */ - if (strncmp(devname, "/dev/", 5) != 0 + if (strncmp(devname, _PATH_DEV, sizeof _PATH_DEV - 1) != 0 || (cp = strtok((char *) 0, WSPACE)) == 0 || *cp != '0' || sscanf(cp, "%o", &prot) == 0 |