diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2004-09-20 21:36:51 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2004-09-20 21:36:51 +0000 |
commit | 35c38721e4855a79151c5ffc498176931bbb5634 (patch) | |
tree | 43e883d8000b06387f92b86b5c83f0860749f9a8 | |
parent | 5200ff9e7b37781296e14544fcb2803bdc076d20 (diff) |
compile cleanly with -Wsign-compare
ok ho
-rw-r--r-- | sbin/isakmpd/virtual.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/isakmpd/virtual.c b/sbin/isakmpd/virtual.c index efcbfd7d15c..d6132fe7932 100644 --- a/sbin/isakmpd/virtual.c +++ b/sbin/isakmpd/virtual.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtual.c,v 1.8 2004/08/10 19:21:01 deraadt Exp $ */ +/* $OpenBSD: virtual.c,v 1.9 2004/09/20 21:36:50 hshoexer Exp $ */ /* * Copyright (c) 2004 Håkan Olsson. All rights reserved. @@ -251,7 +251,7 @@ virtual_bind(const struct sockaddr *addr) */ port = udp_default_port ? udp_default_port : UDP_DEFAULT_PORT_STR; lport = strtol(port, &ep, 10); - if (*ep != '\0' || lport < 0 || lport > USHRT_MAX) { + if (*ep != '\0' || lport < 0 || lport > (long)USHRT_MAX) { log_print("virtual_bind: " "port string \"%s\" not convertible to in_port_t", port); free(v); @@ -276,7 +276,7 @@ virtual_bind(const struct sockaddr *addr) port = udp_encap_default_port ? udp_encap_default_port : UDP_ENCAP_DEFAULT_PORT_STR; lport = strtol(port, &ep, 10); - if (*ep != '\0' || lport < 0 || lport > USHRT_MAX) { + if (*ep != '\0' || lport < 0 || lport > (long)USHRT_MAX) { log_print("virtual_bind: " "port string \"%s\" not convertible to in_port_t", port); v->main->vtbl->remove(v->main); |