From owner-svn-src-all@freebsd.org Fri Apr 15 03:50:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67820AED6D3; Fri, 15 Apr 2016 03:50:34 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39AA51055; Fri, 15 Apr 2016 03:50:34 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3F3oXga059728; Fri, 15 Apr 2016 03:50:33 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3F3oXgW059726; Fri, 15 Apr 2016 03:50:33 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201604150350.u3F3oXgW059726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 15 Apr 2016 03:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298032 - head/usr.sbin/ppp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 03:50:34 -0000 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);