treewide: pass bool as second argument of blobmsg_check_attr
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 16 May 2019 20:09:36 +0000 (22:09 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 16 May 2019 20:15:16 +0000 (22:15 +0200)
blobmsg_check_attr() takes as second argument a bool; fix it where needed

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface-ip.c
interface.c
proto-shell.c
ubus.c

index 6900cd7b92207c0dcba040ca02c25e600c6ee2c7..d4f428db5c88b836c5bbe0460242404b3d32f413 100644 (file)
@@ -1358,7 +1358,7 @@ interface_add_dns_server_list(struct interface_ip_settings *ip, struct blob_attr
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
                        continue;
 
-               if (!blobmsg_check_attr(cur, NULL))
+               if (!blobmsg_check_attr(cur, false))
                        continue;
 
                interface_add_dns_server(ip, blobmsg_data(cur));
@@ -1390,7 +1390,7 @@ interface_add_dns_search_list(struct interface_ip_settings *ip, struct blob_attr
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
                        continue;
 
-               if (!blobmsg_check_attr(cur, NULL))
+               if (!blobmsg_check_attr(cur, false))
                        continue;
 
                interface_add_dns_search_domain(ip, blobmsg_data(cur));
index e0652cdb79d0fc957a11db2146242a439c51fbf7..028dc6ccd5e53fd26ffe498699ba6621461311b9 100644 (file)
@@ -497,7 +497,7 @@ interface_add_assignment_classes(struct interface *iface, struct blob_attr *list
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
                        continue;
 
-               if (!blobmsg_check_attr(cur, NULL))
+               if (!blobmsg_check_attr(cur, false))
                        continue;
 
                struct interface_assignment_class *c = malloc(sizeof(*c) + blobmsg_data_len(cur));
index 07ec21ac440eac137eb764ff0fcdb06854bd1988..26622165df51daaf8e513df5f3254319a2cfa0d2 100644 (file)
@@ -606,7 +606,7 @@ fill_string_list(struct blob_attr *attr, char **argv, int max)
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
                        return false;
 
-               if (!blobmsg_check_attr(cur, NULL))
+               if (!blobmsg_check_attr(cur, false))
                        return false;
 
                argv[argc++] = blobmsg_data(cur);
@@ -683,7 +683,7 @@ proto_shell_notify_error(struct proto_shell_state *state, struct blob_attr **tb)
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
                        goto error;
 
-               if (!blobmsg_check_attr(cur, NULL))
+               if (!blobmsg_check_attr(cur, false))
                        goto error;
 
                data[n_data++] = blobmsg_data(cur);
diff --git a/ubus.c b/ubus.c
index e7cbfb96c7c25e61ba7ac729c240f2637c03ef8a..150d818c978ed070e58efefb73f0655f4eb93295 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -243,7 +243,7 @@ netifd_handle_alias(struct ubus_context *ctx, struct ubus_object *obj,
                if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING)
                        goto error;
 
-               if (!blobmsg_check_attr(cur, NULL))
+               if (!blobmsg_check_attr(cur, false))
                        goto error;
 
                alias_notify_device(blobmsg_data(cur), dev);