summaryrefslogtreecommitdiffstats
path: root/ipset.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipset.c')
-rw-r--r--ipset.c8
1 files changed, 4 insertions, 4 deletions
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;