summaryrefslogtreecommitdiff
path: root/lib/libc/rpc/pmap_clnt.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-07-09 03:05:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-07-09 03:05:07 +0000
commit7ff0c3acc19ffe11a2eab82c222a2a30ba7a10b7 (patch)
tree8d6abbe7934e5ad419c2995bc3cab129fc7a6faa /lib/libc/rpc/pmap_clnt.c
parent8feb5b83a9e4e8b3292bd50bdecba817e0c2508b (diff)
avoid close(closed_socket) or close(-1); it looks disgusting in kdump
Diffstat (limited to 'lib/libc/rpc/pmap_clnt.c')
-rw-r--r--lib/libc/rpc/pmap_clnt.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libc/rpc/pmap_clnt.c b/lib/libc/rpc/pmap_clnt.c
index 7fac9416c72..5aadd8d081c 100644
--- a/lib/libc/rpc/pmap_clnt.c
+++ b/lib/libc/rpc/pmap_clnt.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_clnt.c,v 1.6 1996/08/20 21:15:40 deraadt Exp $";
+static char *rcsid = "$OpenBSD: pmap_clnt.c,v 1.7 1997/07/09 03:05:03 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -60,7 +60,7 @@ pmap_set(program, version, protocol, port)
u_short port;
{
struct sockaddr_in myaddress;
- int socket = -1;
+ int sock = -1;
register CLIENT *client;
struct pmap parms;
bool_t rslt;
@@ -69,7 +69,7 @@ pmap_set(program, version, protocol, port)
return (FALSE);
myaddress.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
client = clntudp_bufcreate(&myaddress, PMAPPROG, PMAPVERS,
- timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
+ timeout, &sock, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
if (client == (CLIENT *)NULL)
return (FALSE);
parms.pm_prog = program;
@@ -82,8 +82,8 @@ pmap_set(program, version, protocol, port)
return (FALSE);
}
CLNT_DESTROY(client);
- if (socket != -1)
- (void)close(socket);
+ if (sock != -1)
+ (void)close(sock);
return (rslt);
}
@@ -97,7 +97,7 @@ pmap_unset(program, version)
u_long version;
{
struct sockaddr_in myaddress;
- int socket = -1;
+ int sock = -1;
register CLIENT *client;
struct pmap parms;
bool_t rslt;
@@ -106,7 +106,7 @@ pmap_unset(program, version)
return (FALSE);
myaddress.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
client = clntudp_bufcreate(&myaddress, PMAPPROG, PMAPVERS,
- timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
+ timeout, &sock, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
if (client == (CLIENT *)NULL)
return (FALSE);
parms.pm_prog = program;
@@ -115,7 +115,7 @@ pmap_unset(program, version)
CLNT_CALL(client, PMAPPROC_UNSET, xdr_pmap, &parms, xdr_bool, &rslt,
tottimeout);
CLNT_DESTROY(client);
- if (socket != -1)
- (void)close(socket);
+ if (sock != -1)
+ (void)close(sock);
return (rslt);
}