Date: Sat, 9 Apr 2016 20:05:39 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297761 - head/bin/sh Message-ID: <201604092005.u39K5dBr092929@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sat Apr 9 20:05:39 2016 New Revision: 297761 URL: https://svnweb.freebsd.org/changeset/base/297761 Log: sh(1): replace 0 with NULL for pointers. Found with devel/coccinelle. Reviewed by: jilles Modified: head/bin/sh/miscbltin.c head/bin/sh/parser.c Modified: head/bin/sh/miscbltin.c ============================================================================== --- head/bin/sh/miscbltin.c Sat Apr 9 19:49:40 2016 (r297760) +++ head/bin/sh/miscbltin.c Sat Apr 9 20:05:39 2016 (r297761) @@ -341,7 +341,7 @@ umaskcmd(int argc __unused, char **argv } else { void *set; INTOFF; - if ((set = setmode (ap)) == 0) + if ((set = setmode (ap)) == NULL) error("Illegal number: %s", ap); mask = getmode (set, ~mask & 0777); Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sat Apr 9 19:49:40 2016 (r297760) +++ head/bin/sh/parser.c Sat Apr 9 20:05:39 2016 (r297761) @@ -628,7 +628,7 @@ simplecmd(union node **rpp, union node * /* If we don't have any redirections already, then we must reset */ /* rpp to be the address of the local redir variable. */ - if (redir == 0) + if (redir == NULL) rpp = &redir; args = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604092005.u39K5dBr092929>