summaryrefslogtreecommitdiff
path: root/openbsd-compat/bindresvport.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bindresvport.c')
-rw-r--r--openbsd-compat/bindresvport.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c
index 65afed1e3..c0d5bdb5c 100644
--- a/openbsd-compat/bindresvport.c
+++ b/openbsd-compat/bindresvport.c
@@ -1,6 +1,6 @@
1/* This file has be substantially modified from the original OpenBSD source */ 1/* This file has be substantially modified from the original OpenBSD source */
2 2
3/* $OpenBSD: bindresvport.c,v 1.16 2005/04/01 07:44:03 otto Exp $ */ 3/* $OpenBSD: bindresvport.c,v 1.17 2005/12/21 01:40:22 millert Exp $ */
4 4
5/* 5/*
6 * Copyright 1996, Jason Downs. All rights reserved. 6 * Copyright 1996, Jason Downs. All rights reserved.
@@ -54,8 +54,8 @@ bindresvport_sa(int sd, struct sockaddr *sa)
54{ 54{
55 int error, af; 55 int error, af;
56 struct sockaddr_storage myaddr; 56 struct sockaddr_storage myaddr;
57 struct sockaddr_in *sin; 57 struct sockaddr_in *in;
58 struct sockaddr_in6 *sin6; 58 struct sockaddr_in6 *in6;
59 u_int16_t *portp; 59 u_int16_t *portp;
60 u_int16_t port; 60 u_int16_t port;
61 socklen_t salen; 61 socklen_t salen;
@@ -74,13 +74,13 @@ bindresvport_sa(int sd, struct sockaddr *sa)
74 af = sa->sa_family; 74 af = sa->sa_family;
75 75
76 if (af == AF_INET) { 76 if (af == AF_INET) {
77 sin = (struct sockaddr_in *)sa; 77 in = (struct sockaddr_in *)sa;
78 salen = sizeof(struct sockaddr_in); 78 salen = sizeof(struct sockaddr_in);
79 portp = &sin->sin_port; 79 portp = &in->sin_port;
80 } else if (af == AF_INET6) { 80 } else if (af == AF_INET6) {
81 sin6 = (struct sockaddr_in6 *)sa; 81 in6 = (struct sockaddr_in6 *)sa;
82 salen = sizeof(struct sockaddr_in6); 82 salen = sizeof(struct sockaddr_in6);
83 portp = &sin6->sin6_port; 83 portp = &in6->sin6_port;
84 } else { 84 } else {
85 errno = EPFNOSUPPORT; 85 errno = EPFNOSUPPORT;
86 return (-1); 86 return (-1);