From 50a7cc95dafd20fb596911a724e22e42a9b22c5f Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Mon, 18 Apr 2016 14:37:26 +0000 Subject: [PATCH] rexec(3): use NULL instead of zero for pointers. --- lib/libcompat/4.3/rexec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c index 92357aa2cbf3..1e37fa291928 100644 --- a/lib/libcompat/4.3/rexec.c +++ b/lib/libcompat/4.3/rexec.c @@ -187,7 +187,7 @@ ruserpass(host, aname, apass, aacct) 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 @@ ruserpass(host, aname, apass, aacct) } 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 @@ ruserpass(host, aname, apass, aacct) 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, fd2p) char c, *acct; hp = gethostbyname(*ahost); - if (hp == 0) { + if (hp == NULL) { herror(*ahost); return (-1); }