From 71866e627eefe32eed8033501f5f67c85c74a11a Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Fri, 15 Apr 2016 03:50:33 +0000 Subject: [PATCH] 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 --- usr.sbin/ppp/command.c | 2 +- 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 e90d96b22b3..d0664e82e46 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 f59848e0d1d..af5691b42db 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);