From 3578220cf27c3e7017dd8af6b17c08218cf632d0 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 11 Sep 2012 17:38:17 +0200 Subject: Coding style fixes --- lib/parse.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib/parse.c') 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); -- cgit v1.2.3