summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/net/rresvport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libc/net/rresvport.c b/src/lib/libc/net/rresvport.c
index 21387aa3b1..c807adfb83 100644
--- a/src/lib/libc/net/rresvport.c
+++ b/src/lib/libc/net/rresvport.c
@@ -34,7 +34,7 @@
34 */ 34 */
35 35
36#if defined(LIBC_SCCS) && !defined(lint) 36#if defined(LIBC_SCCS) && !defined(lint)
37static char *rcsid = "$OpenBSD: rresvport.c,v 1.4 1999/12/17 20:48:03 deraadt Exp $"; 37static char *rcsid = "$OpenBSD: rresvport.c,v 1.5 2000/01/26 03:43:20 deraadt Exp $";
38#endif /* LIBC_SCCS and not lint */ 38#endif /* LIBC_SCCS and not lint */
39 39
40#include <sys/param.h> 40#include <sys/param.h>
@@ -108,7 +108,8 @@ rresvport_af(alport, af)
108 } 108 }
109 109
110 *portp = 0; 110 *portp = 0;
111 if (bindresvport_af(s, sa, af) == -1) { 111 sa->sa_family = af;
112 if (bindresvport_sa(s, sa) == -1) {
112 (void)close(s); 113 (void)close(s);
113 return (-1); 114 return (-1);
114 } 115 }