]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
userdbctl: use ansi_highlight_green_red() where appropriate 35572/head
authorMike Yuan <me@yhndnzj.com>
Tue, 10 Dec 2024 18:24:05 +0000 (19:24 +0100)
committerMike Yuan <me@yhndnzj.com>
Wed, 11 Dec 2024 18:19:46 +0000 (19:19 +0100)
src/userdb/userdbctl.c

index bc69175b106d3b51c3e2a975d54ac73e7459cc9e..1ddd05789f9ec0e40fc08c5c2602d082f71a1aaf 100644 (file)
@@ -1035,7 +1035,7 @@ static int display_services(int argc, char *argv[], void *userdata) {
                 r = table_add_many(t,
                                    TABLE_STRING, de->d_name,
                                    TABLE_STRING, no ?: "yes",
-                                   TABLE_SET_COLOR, no ? ansi_highlight_red() : ansi_highlight_green());
+                                   TABLE_SET_COLOR, ansi_highlight_green_red(!no));
                 if (r < 0)
                         return table_log_add_error(r);
         }