Date: Fri, 15 Apr 2016 03:50:33 +0000 (UTC) From: Marcelo Araujo <araujo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298032 - head/usr.sbin/ppp Message-ID: <201604150350.u3F3oXgW059726@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: araujo Date: Fri Apr 15 03:50:33 2016 New Revision: 298032 URL: https://svnweb.freebsd.org/changeset/base/298032 Log: 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 Modified: head/usr.sbin/ppp/command.c head/usr.sbin/ppp/filter.c Modified: head/usr.sbin/ppp/command.c ============================================================================== --- head/usr.sbin/ppp/command.c Fri Apr 15 03:45:09 2016 (r298031) +++ head/usr.sbin/ppp/command.c Fri Apr 15 03:50:33 2016 (r298032) @@ -651,7 +651,7 @@ ShellCommand(struct cmdargs const *arg, if ((shpid = fork()) == 0) { int i, fd; - if ((shell = getenv("SHELL")) == 0) + if ((shell = getenv("SHELL")) == NULL) shell = _PATH_BSHELL; timer_TermService(); Modified: head/usr.sbin/ppp/filter.c ============================================================================== --- head/usr.sbin/ppp/filter.c Fri Apr 15 03:45:09 2016 (r298031) +++ head/usr.sbin/ppp/filter.c Fri Apr 15 03:50:33 2016 (r298032) @@ -80,7 +80,7 @@ ParsePort(const char *service, const cha int port; servent = getservbyname(service, proto); - if (servent != 0) + if (servent != NULL) return ntohs(servent->s_port); port = strtol(service, &cp, 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604150350.u3F3oXgW059726>