summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/net/ethtool-util.c4
-rw-r--r--src/udev/net/link-config.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
index 6346530323..3ec245ecab 100644
--- a/src/udev/net/ethtool-util.c
+++ b/src/udev/net/ethtool-util.c
@@ -31,7 +31,7 @@
#include "log.h"
#include "conf-parser.h"
-static const char* const duplex_table[] = {
+static const char* const duplex_table[_DUP_MAX] = {
[DUP_FULL] = "full",
[DUP_HALF] = "half"
};
@@ -39,7 +39,7 @@ static const char* const duplex_table[] = {
DEFINE_STRING_TABLE_LOOKUP(duplex, Duplex);
DEFINE_CONFIG_PARSE_ENUM(config_parse_duplex, duplex, Duplex, "Failed to parse duplex setting");
-static const char* const wol_table[] = {
+static const char* const wol_table[_WOL_MAX] = {
[WOL_PHY] = "phy",
[WOL_MAGIC] = "magic",
[WOL_OFF] = "off"
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 05225e0111..d3f1affffe 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -466,7 +466,7 @@ int link_get_driver(link_config_ctx *ctx, struct udev_device *device, char **ret
return 0;
}
-static const char* const mac_policy_table[] = {
+static const char* const mac_policy_table[_MACPOLICY_MAX] = {
[MACPOLICY_PERSISTENT] = "persistent",
[MACPOLICY_RANDOM] = "random"
};
@@ -474,7 +474,7 @@ static const char* const mac_policy_table[] = {
DEFINE_STRING_TABLE_LOOKUP(mac_policy, MACPolicy);
DEFINE_CONFIG_PARSE_ENUM(config_parse_mac_policy, mac_policy, MACPolicy, "Failed to parse MAC address policy");
-static const char* const name_policy_table[] = {
+static const char* const name_policy_table[_NAMEPOLICY_MAX] = {
[NAMEPOLICY_DATABASE] = "database",
[NAMEPOLICY_ONBOARD] = "onboard",
[NAMEPOLICY_SLOT] = "slot",