From: Luca Boccassi Date: Wed, 24 Jun 2026 18:07:56 +0000 (+0100) Subject: core: actually sort the parsed LUO session list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ebf344a1b0ae3e9788c088735a50c66c06a4c8d;p=thirdparty%2Fsystemd.git core: actually sort the parsed LUO session list The strv_sort() call sat after a for (;;) loop whose only exits are return statements inside the loop, so it never ran. CID#1660125 Follow-up for 82b8615463c306f8f7eeaec13600c89a7bbef151 --- diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 3fa92aff56b..ce4517e85bd 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -6823,8 +6823,10 @@ int config_parse_luo_sessions( "Failed to parse LUOSession= value, ignoring: %s", rvalue); return 0; } - if (r == 0) + if (r == 0) { + strv_sort(*sessions); return 0; + } if (!luo_session_name_is_valid(word)) { log_syntax(unit, LOG_WARNING, filename, line, 0, @@ -6842,6 +6844,4 @@ int config_parse_luo_sessions( if (r < 0) return log_oom(); } - - strv_sort(*sessions); }