diff options
author | araujo <araujo@FreeBSD.org> | 2016-04-15 03:50:33 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-04-15 03:50:33 +0000 |
commit | 6a05420923a114ee956c787104be39dfffeccbcd (patch) | |
tree | 8ddc9327e50175f396d9724974aa652951d6cb12 | |
parent | a750660049407ea08de9b3ccc071bd3a5271ec05 (diff) | |
download | FreeBSD-src-6a05420923a114ee956c787104be39dfffeccbcd.zip FreeBSD-src-6a05420923a114ee956c787104be39dfffeccbcd.tar.gz |
Use NULL instead of 0 for pointers.
getenv(3) returns NULL if the variable name is not in the current
environment.
getservent(3) returns NULL on EOF or error
MFC after: 4 weeks
-rw-r--r-- | usr.sbin/ppp/command.c | 2 | ||||
-rw-r--r-- | usr.sbin/ppp/filter.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index e90d96b..d0664e8 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -651,7 +651,7 @@ ShellCommand(struct cmdargs const *arg, int bg) if ((shpid = fork()) == 0) { int i, fd; - if ((shell = getenv("SHELL")) == 0) + if ((shell = getenv("SHELL")) == NULL) shell = _PATH_BSHELL; timer_TermService(); diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c index f59848e..af5691b 100644 --- a/usr.sbin/ppp/filter.c +++ b/usr.sbin/ppp/filter.c @@ -80,7 +80,7 @@ ParsePort(const char *service, const char *proto) int port; servent = getservbyname(service, proto); - if (servent != 0) + if (servent != NULL) return ntohs(servent->s_port); port = strtol(service, &cp, 0); |