diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-12-17 20:48:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-12-17 20:48:04 +0000 |
commit | 06e3ea76cea11d16014e616597608e4b5e769891 (patch) | |
tree | 436c71255e338071004835d8ea2d3dab54953f28 /lib/libc/net/rresvport.c | |
parent | 532e040d61d3a74dc748316510f892924493c5cd (diff) |
more fixes from markus
Diffstat (limited to 'lib/libc/net/rresvport.c')
-rw-r--r-- | lib/libc/net/rresvport.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/net/rresvport.c b/lib/libc/net/rresvport.c index e544424cee4..21387aa3b13 100644 --- a/lib/libc/net/rresvport.c +++ b/lib/libc/net/rresvport.c @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rresvport.c,v 1.3 1999/12/17 19:20:30 deraadt Exp $"; +static char *rcsid = "$OpenBSD: rresvport.c,v 1.4 1999/12/17 20:48:03 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -81,11 +81,11 @@ rresvport_af(alport, af) switch (af) { case AF_INET: sa->sa_len = sizeof(struct sockaddr_in); - portp = &((struct sockaddr_in *)&sa)->sin_port; + portp = &((struct sockaddr_in *)sa)->sin_port; break; case AF_INET6: sa->sa_len = sizeof(struct sockaddr_in6); - portp = &((struct sockaddr_in6 *)&sa)->sin6_port; + portp = &((struct sockaddr_in6 *)sa)->sin6_port; break; default: errno = EPFNOSUPPORT; @@ -112,6 +112,6 @@ rresvport_af(alport, af) (void)close(s); return (-1); } - *alport = *portp; + *alport = ntohs(*portp); return (s); } |