From 3e17fd926ff0f8feae97ff7c86dd5ce282315490 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 3 Sep 2018 13:46:28 +0200 Subject: [PATCH] config: fix odhcpd_attrs array size Use ODHCPD_ATTR_MAX as array size of odhcpd_attrs Signed-off-by: Hans Dedecker --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 118349a..6556eac 100644 --- a/src/config.c +++ b/src/config.c @@ -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 }, -- 2.25.1