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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to