Date: Mon, 18 Apr 2016 14:37:27 +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: r298207 - head/lib/libcompat/4.3 Message-ID: <201604181437.u3IEbR5l091544@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Apr 18 14:37:26 2016 New Revision: 298207 URL: https://svnweb.freebsd.org/changeset/base/298207 Log: rexec(3): use NULL instead of zero for pointers. Modified: head/lib/libcompat/4.3/rexec.c Modified: head/lib/libcompat/4.3/rexec.c ============================================================================== --- head/lib/libcompat/4.3/rexec.c Mon Apr 18 14:12:42 2016 (r298206) +++ head/lib/libcompat/4.3/rexec.c Mon Apr 18 14:37:26 2016 (r298207) @@ -187,7 +187,7 @@ next: case LOGIN: if (token()) - if (*aname == 0) { + if (*aname == NULL) { *aname = malloc((unsigned) strlen(tokval) + 1); (void) strcpy(*aname, tokval); } else { @@ -196,14 +196,14 @@ next: } break; case PASSWD: - if ((*aname == 0 || strcmp(*aname, "anonymous")) && + if ((*aname == NULL || strcmp(*aname, "anonymous")) && fstat(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { warnx("Error: .netrc file is readable by others."); warnx("Remove password or make file unreadable by others."); goto bad; } - if (token() && *apass == 0) { + if (token() && *apass == NULL) { *apass = malloc((unsigned) strlen(tokval) + 1); (void) strcpy(*apass, tokval); } @@ -215,7 +215,7 @@ next: warnx("Remove account or make file unreadable by others."); goto bad; } - if (token() && *aacct == 0) { + if (token() && *aacct == NULL) { *aacct = malloc((unsigned) strlen(tokval) + 1); (void) strcpy(*aacct, tokval); } @@ -305,7 +305,7 @@ rexec(ahost, rport, name, pass, cmd, fd2 char c, *acct; hp = gethostbyname(*ahost); - if (hp == 0) { + if (hp == NULL) { herror(*ahost); return (-1); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604181437.u3IEbR5l091544>