summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpcbind
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-10-29 09:30:37 +0000
committermbr <mbr@FreeBSD.org>2003-10-29 09:30:37 +0000
commit2dcf300ab48914b6b129472651ae911c45406528 (patch)
tree9630fcd485bf1221e03dfe4d1c9ca7fb102b9a84 /usr.sbin/rpcbind
parenta387522971631afffb7183568409a6c77984d610 (diff)
downloadFreeBSD-src-2dcf300ab48914b6b129472651ae911c45406528.zip
FreeBSD-src-2dcf300ab48914b6b129472651ae911c45406528.tar.gz
Don't compare a char to NULL.
Obtained from: NetBSD
Diffstat (limited to 'usr.sbin/rpcbind')
-rw-r--r--usr.sbin/rpcbind/rpcb_stat.c4
-rw-r--r--usr.sbin/rpcbind/rpcb_svc_com.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rpcbind/rpcb_stat.c b/usr.sbin/rpcbind/rpcb_stat.c
index e2cf89e..b10ed50 100644
--- a/usr.sbin/rpcbind/rpcb_stat.c
+++ b/usr.sbin/rpcbind/rpcb_stat.c
@@ -116,7 +116,7 @@ rpcbs_getaddr(rpcvers_t rtype, rpcprog_t prog, rpcvers_t vers, char *netid,
return;
if ((al->prog == prog) && (al->vers == vers) &&
(strcmp(al->netid, netid) == 0)) {
- if ((uaddr == NULL) || (uaddr[0] == NULL))
+ if ((uaddr == NULL) || (uaddr[0] == 0))
al->failure++;
else
al->success++;
@@ -134,7 +134,7 @@ rpcbs_getaddr(rpcvers_t rtype, rpcprog_t prog, rpcvers_t vers, char *netid,
al->prog = prog;
al->vers = vers;
al->netid = nconf->nc_netid;
- if ((uaddr == NULL) || (uaddr[0] == '\0')) {
+ if ((uaddr == NULL) || (uaddr[0] == 0)) {
al->failure = 1;
al->success = 0;
} else {
diff --git a/usr.sbin/rpcbind/rpcb_svc_com.c b/usr.sbin/rpcbind/rpcb_svc_com.c
index dbe312e..0a72b66 100644
--- a/usr.sbin/rpcbind/rpcb_svc_com.c
+++ b/usr.sbin/rpcbind/rpcb_svc_com.c
@@ -1438,7 +1438,7 @@ del_pmaplist(RPCB *arg)
} else if (strcmp(arg->r_netid, tcptrans) == 0) {
/* It is TCP */
prot = IPPROTO_TCP;
- } else if (arg->r_netid[0] == NULL) {
+ } else if (arg->r_netid[0] == 0) {
prot = 0; /* Remove all occurrences */
} else {
/* Not an IP protocol */
OpenPOWER on IntegriCloud