]> granicus.if.org Git - ipset/commitdiff
Change 2nd parameter type of ipset_parse_elem
authorQuentin Armitage <quentin@armitage.org.uk>
Thu, 1 Aug 2013 21:17:03 +0000 (23:17 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 1 Aug 2013 21:17:03 +0000 (23:17 +0200)
The only place in ipset where ipset_parse_elem is called is src/ipset.c. The
second parameter to the function call is type->last_elem_optional, which is of
type bool, but ipset_parse_elem is defined in lib/parse.c with the second
parameter having type enum ipset_opt.

The use in lib/parse.c is clearly as a bool.

include/libipset/parse.h
lib/parse.c

index 8e0c7159e692a88fbd667801179820e9cad26b2b..ee16fb53adb4acd26acc91428d7a3d4fd95bef33 100644 (file)
@@ -93,7 +93,7 @@ extern int ipset_parse_output(struct ipset_session *session,
 extern int ipset_parse_ignored(struct ipset_session *session,
                               enum ipset_opt opt, const char *str);
 extern int ipset_parse_elem(struct ipset_session *session,
-                           enum ipset_opt opt, const char *str);
+                           bool optional, const char *str);
 extern int ipset_call_parser(struct ipset_session *session,
                             const struct ipset_arg *arg,
                             const char *str);
index 0058369a12007f6906e71eccab2dc5f224ef9c2f..6df8f2067b1530a2d6602e2039918dd76d457db3 100644 (file)
@@ -1812,7 +1812,7 @@ do {                                      \
  */
 int
 ipset_parse_elem(struct ipset_session *session,
-                enum ipset_opt optional, const char *str)
+                bool optional, const char *str)
 {
        const struct ipset_type *type;
        char *a = NULL, *b = NULL, *tmp, *saved;