diff options
author | mbr <mbr@FreeBSD.org> | 2003-10-29 09:30:37 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2003-10-29 09:30:37 +0000 |
commit | 2dcf300ab48914b6b129472651ae911c45406528 (patch) | |
tree | 9630fcd485bf1221e03dfe4d1c9ca7fb102b9a84 | |
parent | a387522971631afffb7183568409a6c77984d610 (diff) | |
download | FreeBSD-src-2dcf300ab48914b6b129472651ae911c45406528.zip FreeBSD-src-2dcf300ab48914b6b129472651ae911c45406528.tar.gz |
Don't compare a char to NULL.
Obtained from: NetBSD
-rw-r--r-- | usr.sbin/rpcbind/rpcb_stat.c | 4 | ||||
-rw-r--r-- | usr.sbin/rpcbind/rpcb_svc_com.c | 2 |
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 */ |