1998-09-29  Ulrich Drepper  <drepper@cygnus.com>

	* nis/ypclnt.c: Remove not needed close calls.
This commit is contained in:
Ulrich Drepper 1998-09-29 10:36:20 +00:00
parent 6ff5bc6837
commit 87052ab727
2 changed files with 6 additions and 7 deletions

View File

@ -1,3 +1,7 @@
1998-09-29 Ulrich Drepper <drepper@cygnus.com>
* nis/ypclnt.c: Remove not needed close calls.
1998-09-28 23:55 Ulrich Drepper <drepper@cygnus.com>
* nis/ypclnt.c (__yp_bind): Pretty print. Optimize readv result

View File

@ -103,7 +103,7 @@ __yp_bind (const char *domain, dom_binding **ypdb)
{
char path[sizeof (BINDINGDIR) - 1 + strlen (domain) + 10];
struct iovec vec[2];
u_short port;
unsigned short port;
int fd;
sprintf (path, "%s/%s.%ld", BINDINGDIR, domain, YPBINDVERS);
@ -139,7 +139,6 @@ __yp_bind (const char *domain, dom_binding **ypdb)
if (ysd->dom_client)
{
clnt_destroy (ysd->dom_client);
close (ysd->dom_socket);
ysd->dom_client = NULL;
ysd->dom_socket = -1;
}
@ -163,7 +162,6 @@ __yp_bind (const char *domain, dom_binding **ypdb)
if (ntohs (clnt_saddr.sin_port) >= IPPORT_RESERVED)
{
clnt_destroy (client);
close (clnt_sock);
if (is_new)
free (ysd);
return YPERR_YPBIND;
@ -175,14 +173,12 @@ __yp_bind (const char *domain, dom_binding **ypdb)
(caddr_t) &ypbr, RPCTIMEOUT) != RPC_SUCCESS)
{
clnt_destroy (client);
close (clnt_sock);
if (is_new)
free (ysd);
return YPERR_YPBIND;
}
clnt_destroy (client);
close (clnt_sock);
if (ypbr.ypbind_status != YPBIND_SUCC_VAL)
{
@ -714,7 +710,6 @@ yp_all (const char *indomain, const char *inmap,
res = YPERR_SUCCESS;
clnt_destroy (clnt);
close (clnt_sock);
if (status != YP_NOMORE)
{