From b6c452a8fd7c5a4119f552c819e3ab211ea0f496 Mon Sep 17 00:00:00 2001 From: Martin Blapp Date: Wed, 29 Oct 2003 09:22:49 +0000 Subject: [PATCH] Don't compare NULL against a character. Obtained from: NetBSD --- lib/libc/rpc/rpcb_clnt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/rpc/rpcb_clnt.c b/lib/libc/rpc/rpcb_clnt.c index 5897a1ddc224..1701ac30f5c0 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); }