summaryrefslogtreecommitdiffstats
path: root/xtables.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-01-29 13:48:05 +0000
committerPatrick McHardy <kaber@trash.net>2008-01-29 13:48:05 +0000
commit9ee386a1b6d7704b259460152c959ab0e79e02aa (patch)
tree13f39ec579024d42beb0ce6509b0c935dbe8ca03 /xtables.c
parentfe05c768f877bcc69c13d7a9cb1d2b33ef56f600 (diff)
fix gcc warnings
Max Kellermann <max@duempel.org>
Diffstat (limited to 'xtables.c')
-rw-r--r--xtables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xtables.c b/xtables.c
index eba453bf..af4d3dcf 100644
--- a/xtables.c
+++ b/xtables.c
@@ -257,10 +257,10 @@ int service_to_port(const char *name, const char *proto)
u_int16_t parse_port(const char *port, const char *proto)
{
- unsigned int portnum;
+ unsigned portnum;
if ((string_to_number(port, 0, 65535, &portnum)) != -1 ||
- (portnum = service_to_port(port, proto)) != -1)
+ (portnum = service_to_port(port, proto)) != (unsigned)-1)
return (u_int16_t)portnum;
exit_error(PARAMETER_PROBLEM,