From 9dc77ae1b6c2379a2cd7ba631fcefdd243fcda85 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 14 Oct 2013 22:44:13 +0200 Subject: [PATCH] Fix argument parsing --- src/config.c | 8 ++++---- src/ubus.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config.c b/src/config.c index 5bb1a0e..07dad1f 100644 --- a/src/config.c +++ b/src/config.c @@ -331,7 +331,7 @@ int config_parse_interface(struct blob_attr *b, const char *name, bool overwrite if ((c = tb[IFACE_ATTR_UPSTREAM])) { struct blob_attr *cur; - int rem; + unsigned rem; blobmsg_for_each_attr(cur, c, rem) { if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING || !blobmsg_check_attr(cur, NULL)) @@ -362,7 +362,7 @@ int config_parse_interface(struct blob_attr *b, const char *name, bool overwrite if ((c = tb[IFACE_ATTR_DNS])) { struct blob_attr *cur; - int rem; + unsigned rem; iface->always_rewrite_dns = true; blobmsg_for_each_attr(cur, c, rem) { @@ -387,7 +387,7 @@ int config_parse_interface(struct blob_attr *b, const char *name, bool overwrite if ((c = tb[IFACE_ATTR_DOMAIN])) { struct blob_attr *cur; - int rem; + unsigned rem; blobmsg_for_each_attr(cur, c, rem) { if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING || !blobmsg_check_attr(cur, NULL)) @@ -437,7 +437,7 @@ int config_parse_interface(struct blob_attr *b, const char *name, bool overwrite if ((c = tb[IFACE_ATTR_NDPROXY_STATIC])) { struct blob_attr *cur; - int rem; + unsigned rem; blobmsg_for_each_attr(cur, c, rem) { if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING || !blobmsg_check_attr(cur, NULL)) diff --git a/src/ubus.c b/src/ubus.c index 41d538a..5b901d2 100644 --- a/src/ubus.c +++ b/src/ubus.c @@ -222,7 +222,7 @@ static void subscribe_netifd(void) void ubus_apply_network(void) { struct blob_attr *c; - int rem; + unsigned rem; if (!dump) return; @@ -289,7 +289,7 @@ static struct ubus_event_handler event_handler = { .cb = handle_event }; const char* ubus_get_ifname(const char *name) { struct blob_attr *c; - int rem; + unsigned rem; if (!dump) return NULL; @@ -313,7 +313,7 @@ const char* ubus_get_ifname(const char *name) bool ubus_has_prefix(const char *name, const char *ifname) { struct blob_attr *c, *cur; - int rem; + unsigned rem; if (!dump) return NULL; -- 2.25.1