config: fix odhcpd_attrs array size
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 3 Sep 2018 11:46:28 +0000 (13:46 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 3 Sep 2018 11:48:14 +0000 (13:48 +0200)
Use ODHCPD_ATTR_MAX as array size of odhcpd_attrs

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/config.c

index 118349ac311138bf13359f3fdb999037138c5734..6556eac0c376e531d474296ef3fdde093406c1fc 100644 (file)
@@ -153,7 +153,7 @@ enum {
        ODHCPD_ATTR_MAX
 };
 
-static const struct blobmsg_policy odhcpd_attrs[LEASE_ATTR_MAX] = {
+static const struct blobmsg_policy odhcpd_attrs[ODHCPD_ATTR_MAX] = {
        [ODHCPD_ATTR_LEGACY] = { .name = "legacy", .type = BLOBMSG_TYPE_BOOL },
        [ODHCPD_ATTR_MAINDHCP] = { .name = "maindhcp", .type = BLOBMSG_TYPE_BOOL },
        [ODHCPD_ATTR_LEASEFILE] = { .name = "leasefile", .type = BLOBMSG_TYPE_STRING },