summaryrefslogtreecommitdiff
path: root/lib/libcompat
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-18 14:37:26 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-18 14:37:26 +0000
commit50a7cc95dafd20fb596911a724e22e42a9b22c5f (patch)
tree0c126e44b2298021ed65df161400ebdadbad6978 /lib/libcompat
parentff129d6f87d68e73b1023ec046b88b448483cb99 (diff)
downloadsrc-test-50a7cc95dafd20fb596911a724e22e42a9b22c5f.tar.gz
src-test-50a7cc95dafd20fb596911a724e22e42a9b22c5f.zip
rexec(3): use NULL instead of zero for pointers.
Notes
Notes: svn path=/head/; revision=298207
Diffstat (limited to 'lib/libcompat')
-rw-r--r--lib/libcompat/4.3/rexec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c
index 92357aa2cbf34..1e37fa291928c 100644
--- a/lib/libcompat/4.3/rexec.c
+++ b/lib/libcompat/4.3/rexec.c
@@ -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, fd2p)
char c, *acct;
hp = gethostbyname(*ahost);
- if (hp == 0) {
+ if (hp == NULL) {
herror(*ahost);
return (-1);
}