diff options
author | Daniel Mack <zonque@gmail.com> | 2014-03-07 21:38:48 +0100 |
---|---|---|
committer | Daniel Mack <zonque@gmail.com> | 2014-03-07 21:38:48 +0100 |
commit | 2c5859afecee81e345fc9526b1083bf79990ffb8 (patch) | |
tree | 8bc8deeea888c3df4a28a5f94f3ab79da3fe6b30 /src/journal | |
parent | units: set 'AllowUser=root own' and 'AllowWorld=talk' own for all .busname files (diff) | |
download | systemd-2c5859afecee81e345fc9526b1083bf79990ffb8.tar.xz systemd-2c5859afecee81e345fc9526b1083bf79990ffb8.zip |
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')
-rw-r--r-- | src/journal/journald-server.c | 8 |
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); |