diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | nis/ypclnt.c | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index 87e1f3a70e..63ab4e7c10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/nis/ypclnt.c b/nis/ypclnt.c index aa81655f91..dff92d75eb 100644 --- a/nis/ypclnt.c +++ b/nis/ypclnt.c @@ -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); @@ -138,8 +138,7 @@ __yp_bind (const char *domain, dom_binding **ypdb) { if (ysd->dom_client) { - clnt_destroy(ysd->dom_client); - close (ysd->dom_socket); + clnt_destroy (ysd->dom_client); 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) { |