diff options
author | mbr <mbr@FreeBSD.org> | 2003-10-29 09:22:49 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2003-10-29 09:22:49 +0000 |
commit | c2a099bee63bf848b14d275c3d1f7ec62cbd0846 (patch) | |
tree | 9d8764f7d850232e1a3bd298ddb9bf24887be043 | |
parent | 60f777a4673d200aa5f9efac29288e8d8b1c6b4f (diff) | |
download | FreeBSD-src-c2a099bee63bf848b14d275c3d1f7ec62cbd0846.zip FreeBSD-src-c2a099bee63bf848b14d275c3d1f7ec62cbd0846.tar.gz |
Don't compare NULL against a character.
Obtained from: NetBSD
-rw-r--r-- | lib/libc/rpc/rpcb_clnt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/rpc/rpcb_clnt.c b/lib/libc/rpc/rpcb_clnt.c index 5897a1d..1701ac3 100644 --- a/lib/libc/rpc/rpcb_clnt.c +++ b/lib/libc/rpc/rpcb_clnt.c @@ -656,7 +656,7 @@ got_entry(relp, nconf) if ((strcmp(nconf->nc_proto, rmap->r_nc_proto) == 0) && (strcmp(nconf->nc_protofmly, rmap->r_nc_protofmly) == 0) && (nconf->nc_semantics == rmap->r_nc_semantics) && - (rmap->r_maddr != NULL) && (rmap->r_maddr[0] != NULL)) { + (rmap->r_maddr != NULL) && (rmap->r_maddr[0] != 0)) { na = uaddr2taddr(nconf, rmap->r_maddr); #ifdef ND_DEBUG fprintf(stderr, "\tRemote address is [%s].\n", @@ -975,7 +975,7 @@ regular_rpcbind: (xdrproc_t) xdr_rpcb, (char *)(void *)&parms, (xdrproc_t) xdr_wrapstring, (char *)(void *) &ua, *tp); if (clnt_st == RPC_SUCCESS) { - if ((ua == NULL) || (ua[0] == NULL)) { + if ((ua == NULL) || (ua[0] == 0)) { /* address unknown */ rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED; goto error; @@ -1231,7 +1231,7 @@ rpcb_gettime(host, timep) enum clnt_stat st; - if ((host == NULL) || (host[0] == NULL)) { + if ((host == NULL) || (host[0] == 0)) { time(timep); return (TRUE); } |