diff options
| author | Ian Dowse <iedowse@FreeBSD.org> | 2002-07-26 07:52:21 +0000 |
|---|---|---|
| committer | Ian Dowse <iedowse@FreeBSD.org> | 2002-07-26 07:52:21 +0000 |
| commit | bb1ca86f241c98e12bb45465329622b4c7f669d0 (patch) | |
| tree | 2c512985b51775d3d4e8c88cf5c2af953f016c94 | |
| parent | 1c367fb5b2e63db8468fafbbe10e8ef4299f7733 (diff) | |
Notes
| -rw-r--r-- | lib/libc/rpc/rpcb_clnt.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/libc/rpc/rpcb_clnt.c b/lib/libc/rpc/rpcb_clnt.c index b47f36bc6139..aa26275a441c 100644 --- a/lib/libc/rpc/rpcb_clnt.c +++ b/lib/libc/rpc/rpcb_clnt.c @@ -685,7 +685,7 @@ __rpcbind_is_up() nconf = NULL; localhandle = setnetconfig(); - while (nconf = getnetconfig(localhandle)){ + while ((nconf = getnetconfig(localhandle)) != NULL) { if (nconf->nc_protofmly != NULL && strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0) break; @@ -777,19 +777,13 @@ __rpcb_findaddr_timed(program, version, nconf, host, clpp, tp) */ if (strcmp(nconf->nc_proto, NC_TCP) == 0) { struct netconfig *newnconf; - void *handle; - if ((handle = getnetconfigent("udp")) == NULL) { - rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; - return (NULL); - } - if ((newnconf = __rpc_getconf(handle)) == NULL) { - __rpc_endconf(handle); + if ((newnconf = getnetconfigent("udp")) == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; return (NULL); } client = getclnthandle(host, newnconf, &parms.r_addr); - __rpc_endconf(handle); + freenetconfigent(newnconf); } else { client = getclnthandle(host, nconf, &parms.r_addr); } |
