summaryrefslogtreecommitdiff
path: root/lib/parse.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-09-11 17:38:17 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-09-11 17:38:17 +0200
commit3578220cf27c3e7017dd8af6b17c08218cf632d0 (patch)
tree3dd0a57f443ba93ee4000c40917f2dfbf5646a6e /lib/parse.c
parentd95c2f1eb788c4ccb1ce6f4add61943dbb334f07 (diff)
downloadipset-3578220cf27c3e7017dd8af6b17c08218cf632d0.tar.gz
Coding style fixes
Diffstat (limited to 'lib/parse.c')
-rw-r--r--lib/parse.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/parse.c b/lib/parse.c
index 8c67c58..65fddd4 100644
--- a/lib/parse.c
+++ b/lib/parse.c
@@ -63,13 +63,13 @@ static char *
escape_range_separator(const char *str)
{
const char *tmp = NULL;
-
+
if (STRNEQ(str, IPSET_ESCAPE_START, 1)) {
tmp = strstr(str, IPSET_ESCAPE_END);
if (tmp == NULL)
return NULL;
}
-
+
return range_separator(tmp == NULL ? str : tmp);
}
@@ -248,7 +248,7 @@ find_range_separator(struct ipset_session *session, char *str)
}
static char *
-strip_escape(struct ipset_session *session, char * str)
+strip_escape(struct ipset_session *session, char *str)
{
if (STRNEQ(str, IPSET_ESCAPE_START, 1)) {
if (!STREQ(str + strlen(str) - 1, IPSET_ESCAPE_END)) {
@@ -279,7 +279,7 @@ parse_portname(struct ipset_session *session, const char *str,
if (tmp == NULL)
goto error;
- service = getservbyname(tmp, proto);
+ service = getservbyname(tmp, proto);
if (service != NULL) {
*port = ntohs((uint16_t) service->s_port);
free(saved);
@@ -748,7 +748,8 @@ get_addrinfo(struct ipset_session *session,
if (found == 0)
return syntax_err("cannot parse %s: "
"%s address could not be resolved",
- str, family == NFPROTO_IPV4 ? "IPv4" : "IPv6");
+ str,
+ family == NFPROTO_IPV4 ? "IPv4" : "IPv6");
return err;
}
@@ -1642,7 +1643,7 @@ ipset_call_parser(struct ipset_session *session,
if (ipset_data_flags_test(data, IPSET_FLAG(arg->opt))
&& !(arg->opt == IPSET_OPT_FAMILY
- && ipset_data_test_ignored(data, IPSET_OPT_FAMILY)))
+ && ipset_data_test_ignored(data, IPSET_OPT_FAMILY)))
return syntax_err("%s already specified", arg->name[0]);
return arg->parse(session, arg->opt, str);