Don't compare a char to NULL.
Obtained from: NetBSD
This commit is contained in:
parent
f4a180cc7b
commit
545fbf37df
@ -116,7 +116,7 @@ rpcbs_getaddr(rpcvers_t rtype, rpcprog_t prog, rpcvers_t vers, char *netid,
|
|||||||
return;
|
return;
|
||||||
if ((al->prog == prog) && (al->vers == vers) &&
|
if ((al->prog == prog) && (al->vers == vers) &&
|
||||||
(strcmp(al->netid, netid) == 0)) {
|
(strcmp(al->netid, netid) == 0)) {
|
||||||
if ((uaddr == NULL) || (uaddr[0] == NULL))
|
if ((uaddr == NULL) || (uaddr[0] == 0))
|
||||||
al->failure++;
|
al->failure++;
|
||||||
else
|
else
|
||||||
al->success++;
|
al->success++;
|
||||||
@ -134,7 +134,7 @@ rpcbs_getaddr(rpcvers_t rtype, rpcprog_t prog, rpcvers_t vers, char *netid,
|
|||||||
al->prog = prog;
|
al->prog = prog;
|
||||||
al->vers = vers;
|
al->vers = vers;
|
||||||
al->netid = nconf->nc_netid;
|
al->netid = nconf->nc_netid;
|
||||||
if ((uaddr == NULL) || (uaddr[0] == '\0')) {
|
if ((uaddr == NULL) || (uaddr[0] == 0)) {
|
||||||
al->failure = 1;
|
al->failure = 1;
|
||||||
al->success = 0;
|
al->success = 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1438,7 +1438,7 @@ del_pmaplist(RPCB *arg)
|
|||||||
} else if (strcmp(arg->r_netid, tcptrans) == 0) {
|
} else if (strcmp(arg->r_netid, tcptrans) == 0) {
|
||||||
/* It is TCP */
|
/* It is TCP */
|
||||||
prot = IPPROTO_TCP;
|
prot = IPPROTO_TCP;
|
||||||
} else if (arg->r_netid[0] == NULL) {
|
} else if (arg->r_netid[0] == 0) {
|
||||||
prot = 0; /* Remove all occurrences */
|
prot = 0; /* Remove all occurrences */
|
||||||
} else {
|
} else {
|
||||||
/* Not an IP protocol */
|
/* Not an IP protocol */
|
||||||
|
Loading…
Reference in New Issue
Block a user