Don't compare a char to NULL.
Obtained from: NetBSD
This commit is contained in:
parent
f4a180cc7b
commit
545fbf37df
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121656
@ -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 {
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user