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.
This commit is contained in:
Daniel Mack
2014-03-07 21:38:48 +01:00
parent fe8d029277
commit 2c5859afec
9 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -967,7 +967,7 @@ bool log_on_console(void) {
return syslog_fd < 0 && kmsg_fd < 0 && journal_fd < 0;
}
static const char *const log_target_table[] = {
static const char *const log_target_table[_LOG_TARGET_MAX] = {
[LOG_TARGET_CONSOLE] = "console",
[LOG_TARGET_KMSG] = "kmsg",
[LOG_TARGET_JOURNAL] = "journal",