]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: make a constant array static
authorLennart Poettering <lennart@poettering.net>
Sun, 28 Apr 2019 09:25:48 +0000 (11:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 24 May 2019 13:05:27 +0000 (15:05 +0200)
src/login/logind-user.c

index 05c57c1c327ff8c815169a390a49f12eace5796a..1f07a98dd8e4349009c6e34b435ea0314773ef3e 100644 (file)
@@ -668,7 +668,7 @@ static bool elect_display_filter(Session *s) {
 
 static int elect_display_compare(Session *s1, Session *s2) {
         /* Indexed by SessionType. Lower numbers mean more preferred. */
-        const int type_ranks[_SESSION_TYPE_MAX] = {
+        static const int type_ranks[_SESSION_TYPE_MAX] = {
                 [SESSION_UNSPECIFIED] = 0,
                 [SESSION_TTY] = -2,
                 [SESSION_X11] = -3,