From 6a5878a3748d84d95e15b9a8b018e1bfc54fc894 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu" Date: Sat, 15 Nov 2008 20:20:09 +0000 Subject: 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) --- ipset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipset.c') diff --git a/ipset.c b/ipset.c index 6a204b9..ba007e5 100644 --- a/ipset.c +++ b/ipset.c @@ -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; -- cgit v1.2.3