summaryrefslogtreecommitdiff
path: root/src/network
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/network
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/network')
-rw-r--r--src/network/networkd-netdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 9f580aeab9..5796032100 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -28,7 +28,7 @@
#define VLANID_MAX 4094
-static const char* const netdev_kind_table[] = {
+static const char* const netdev_kind_table[_NETDEV_KIND_MAX] = {
[NETDEV_KIND_BRIDGE] = "bridge",
[NETDEV_KIND_BOND] = "bond",
[NETDEV_KIND_VLAN] = "vlan",
@@ -38,7 +38,7 @@ static const char* const netdev_kind_table[] = {
DEFINE_STRING_TABLE_LOOKUP(netdev_kind, NetDevKind);
DEFINE_CONFIG_PARSE_ENUM(config_parse_netdev_kind, netdev_kind, NetDevKind, "Failed to parse netdev kind");
-static const char* const macvlan_mode_table[] = {
+static const char* const macvlan_mode_table[_NETDEV_MACVLAN_MODE_MAX] = {
[NETDEV_MACVLAN_MODE_PRIVATE] = "private",
[NETDEV_MACVLAN_MODE_VEPA] = "vepa",
[NETDEV_MACVLAN_MODE_BRIDGE] = "bridge",