summaryrefslogtreecommitdiff
path: root/src/udev/net/link-config.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-03-07 21:38:48 +0100
committerDaniel Mack <zonque@gmail.com>2014-03-07 21:38:48 +0100
commit2c5859afecee81e345fc9526b1083bf79990ffb8 (patch)
tree8bc8deeea888c3df4a28a5f94f3ab79da3fe6b30 /src/udev/net/link-config.c
parentfe8d029277f8077d4537489b358ce7f10d59ecc2 (diff)
Make tables for DEFINE_STRING_TABLE_LOOKUP consistent
Bring some arrays that are used for DEFINE_STRING_TABLE_LOOKUP() in the same order than the enums they reference. Also, pass the corresponding _MAX value to the array initalizer where appropriate.
Diffstat (limited to 'src/udev/net/link-config.c')
-rw-r--r--src/udev/net/link-config.c4
1 files changed, 2 insertions, 2 deletions
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",