summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.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/journal/journald-server.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/journal/journald-server.c')
-rw-r--r--src/journal/journald-server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 2a90b443b1..8680650759 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -70,7 +70,7 @@
#define RECHECK_AVAILABLE_SPACE_USEC (30*USEC_PER_SEC)
-static const char* const storage_table[] = {
+static const char* const storage_table[_STORAGE_MAX] = {
[STORAGE_AUTO] = "auto",
[STORAGE_VOLATILE] = "volatile",
[STORAGE_PERSISTENT] = "persistent",
@@ -80,10 +80,10 @@ static const char* const storage_table[] = {
DEFINE_STRING_TABLE_LOOKUP(storage, Storage);
DEFINE_CONFIG_PARSE_ENUM(config_parse_storage, storage, Storage, "Failed to parse storage setting");
-static const char* const split_mode_table[] = {
- [SPLIT_NONE] = "none",
+static const char* const split_mode_table[_SPLIT_MAX] = {
+ [SPLIT_LOGIN] = "login",
[SPLIT_UID] = "uid",
- [SPLIT_LOGIN] = "login"
+ [SPLIT_NONE] = "none",
};
DEFINE_STRING_TABLE_LOOKUP(split_mode, SplitMode);