summaryrefslogtreecommitdiffstats
path: root/lib/libcompat
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-18 14:37:26 +0000
committerpfg <pfg@FreeBSD.org>2016-04-18 14:37:26 +0000
commit163ec53664d75a6d93af519b0f3eb2d8f24d46c2 (patch)
tree0c126e44b2298021ed65df161400ebdadbad6978 /lib/libcompat
parent7c5409f82bd191c4d93ade12415082af0f55b9fe (diff)
downloadFreeBSD-src-163ec53664d75a6d93af519b0f3eb2d8f24d46c2.zip
FreeBSD-src-163ec53664d75a6d93af519b0f3eb2d8f24d46c2.tar.gz
rexec(3): use NULL instead of zero for pointers.
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 92357aa..1e37fa2 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);
}
OpenPOWER on IntegriCloud