*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_simple.c,v 1.5 1996/12/10 07:43:34 deraadt Exp $";
+static char *rcsid = "$OpenBSD: clnt_simple.c,v 1.6 1996/12/10 07:46:33 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
/* reuse old client */
} else {
crp->valid = 0;
- (void)close(crp->socket);
+ if (crp->socket != -1)
+ (void)close(crp->socket);
crp->socket = RPC_ANYSOCK;
if (crp->client) {
clnt_destroy(crp->client);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.10 1996/11/14 06:17:36 etheisen Exp $";
+static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.11 1996/12/10 07:46:37 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
sizeof(*raddr)) < 0)) {
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = errno;
- (void)close(*sockp);
+ if (*sockp != -1)
+ (void)close(*sockp);
goto fooy;
}
ct->ct_closeit = TRUE;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_getmaps.c,v 1.3 1996/08/19 08:31:37 tholo Exp $";
+static char *rcsid = "$OpenBSD: pmap_getmaps.c,v 1.4 1996/12/10 07:46:39 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
}
CLNT_DESTROY(client);
}
- (void)close(socket);
+ if (socket != -1)
+ (void)close(socket);
address->sin_port = 0;
return (head);
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_getport.c,v 1.3 1996/08/19 08:31:38 tholo Exp $";
+static char *rcsid = "$OpenBSD: pmap_getport.c,v 1.4 1996/12/10 07:46:41 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
}
CLNT_DESTROY(client);
}
- (void)close(socket);
+ if (socket != -1)
+ (void)close(socket);
address->sin_port = 0;
return (port);
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.11 1996/11/14 06:23:50 etheisen Exp $";
+static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.12 1996/12/10 07:46:43 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
} else {
stat = RPC_FAILED;
}
- (void)close(socket);
+ if (socket != -1)
+ (void)close(socket);
addr->sin_port = 0;
return (stat);
}