From 2c5859afecee81e345fc9526b1083bf79990ffb8 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 7 Mar 2014 21:38:48 +0100 Subject: 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. --- src/login/logind-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/login') diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 3700522f9b..33ab09ea52 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -1115,10 +1115,10 @@ static const char* const session_state_table[_SESSION_STATE_MAX] = { DEFINE_STRING_TABLE_LOOKUP(session_state, SessionState); static const char* const session_type_table[_SESSION_TYPE_MAX] = { + [SESSION_UNSPECIFIED] = "unspecified", [SESSION_TTY] = "tty", [SESSION_X11] = "x11", [SESSION_WAYLAND] = "wayland", - [SESSION_UNSPECIFIED] = "unspecified", }; DEFINE_STRING_TABLE_LOOKUP(session_type, SessionType); -- cgit v1.2.3-54-g00ecf