diff options
author | /C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu> | 2008-11-15 20:20:09 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu> | 2008-11-15 20:20:09 +0000 |
commit | 6a5878a3748d84d95e15b9a8b018e1bfc54fc894 (patch) | |
tree | 1c5131e29dd469a07090277c82ebb582fb3aa9fa /ipset.c | |
parent | 4eec8b3824d49c1c0503ebbf7844a4e312bc29e1 (diff) |
2.4.5
- setlist type does not work properly together with swapping
sets, bug reported by Thomas Jacob.
- Include linux/capability.h explicitly in ip_set.c (Jan Engelhardt)
Diffstat (limited to 'ipset.c')
-rw-r--r-- | ipset.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -118,7 +118,7 @@ static struct option opts_long[] = { {"help", 2, 0, 'H'}, /* end */ - {0, 0, 0, 0}, + {NULL}, }; static char opts_short[] = @@ -731,13 +731,13 @@ string_to_number(const char *str, unsigned int min, unsigned int max, static int string_to_port(const char *str, ip_set_ip_t *port) { - struct servent *service = getservbyname(str, "tcp"); + struct servent *service; if ((service = getservbyname(str, "tcp")) != NULL) { *port = ntohs((uint16_t) service->s_port); return 0; } - return - 1; + return -1; } /* Fills the 'ip' with the parsed port in host byte order */ @@ -1952,7 +1952,7 @@ static int find_cmd(int option) int i; for (i = 1; i <= NUMBER_OF_CMD; i++) - if (cmdflags[i] == (char) option) + if (cmdflags[i] == option) return i; return CMD_NONE; |