config: blobmsg_check_attr expects bool type as last argument
[project/odhcpd.git] / src / ubus.c
index 19bd3af..14d0a5f 100644 (file)
@@ -163,7 +163,6 @@ enum {
        IFACE_ATTR_DATA,
        IFACE_ATTR_PREFIX,
        IFACE_ATTR_ADDRESS,
-       IFACE_ATTR_ADDRESS4,
        IFACE_ATTR_MAX,
 };
 
@@ -174,7 +173,6 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = {
        [IFACE_ATTR_DATA] = { .name = "data", .type = BLOBMSG_TYPE_TABLE },
        [IFACE_ATTR_PREFIX] = { .name = "ipv6-prefix", .type = BLOBMSG_TYPE_ARRAY },
        [IFACE_ATTR_ADDRESS] = { .name = "ipv6-address", .type = BLOBMSG_TYPE_ARRAY },
-       [IFACE_ATTR_ADDRESS4] = { .name = "ipv4-address", .type = BLOBMSG_TYPE_ARRAY },
 };
 
 static void handle_dump(_unused struct ubus_request *req, _unused int type, struct blob_attr *msg)
@@ -347,7 +345,7 @@ bool ubus_has_prefix(const char *name, const char *ifname)
                        continue;
 
                if ((cur = tb[IFACE_ATTR_PREFIX])) {
-                       if (blobmsg_type(cur) != BLOBMSG_TYPE_ARRAY || !blobmsg_check_attr(cur, NULL))
+                       if (blobmsg_type(cur) != BLOBMSG_TYPE_ARRAY || !blobmsg_check_attr(cur, false))
                                continue;
 
                        struct blob_attr *d;