restrict is a keyword

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10647 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2001-09-03 12:04:34 +00:00
parent 897f0b1f93
commit dd4b4a1159
2 changed files with 4 additions and 4 deletions

View File

@@ -302,7 +302,7 @@ void
socket_set_port (struct sockaddr *sa, int port);
void
socket_set_portrange (int sock, int restrict, int af);
socket_set_portrange (int sock, int restr, int af);
void
socket_set_debug (int sock);

View File

@@ -225,11 +225,11 @@ socket_set_port (struct sockaddr *sa, int port)
* Set the range of ports to use when binding with port = 0.
*/
void
socket_set_portrange (int sock, int restrict, int af)
socket_set_portrange (int sock, int restr, int af)
{
#if defined(IP_PORTRANGE)
if (af == AF_INET) {
int on = restrict ? IP_PORTRANGE_HIGH : IP_PORTRANGE_DEFAULT;
int on = restr ? IP_PORTRANGE_HIGH : IP_PORTRANGE_DEFAULT;
if (setsockopt (sock, IPPROTO_IP, IP_PORTRANGE, &on,
sizeof(on)) < 0)
warn ("setsockopt IP_PORTRANGE (ignored)");
@@ -237,7 +237,7 @@ socket_set_portrange (int sock, int restrict, int af)
#endif
#if defined(IPV6_PORTRANGE)
if (af == AF_INET6) {
int on = restrict ? IPV6_PORTRANGE_HIGH :
int on = restr ? IPV6_PORTRANGE_HIGH :
IPV6_PORTRANGE_DEFAULT;
if (setsockopt (sock, IPPROTO_IPV6, IPV6_PORTRANGE, &on,
sizeof(on)) < 0)