]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
terminal-util: fix underlying with SYSTEMD_COLORS=no
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 19 Mar 2024 19:49:04 +0000 (04:49 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 19 Mar 2024 21:21:56 +0000 (22:21 +0100)
Fixes #31857.

src/basic/terminal-util.h

index 2aed260526a66fed4ec6b4e00e9ee2245cf348e1..0f3175ef43f1282b0fa4a610f813758037b762cd 100644 (file)
@@ -197,7 +197,7 @@ static inline bool colors_enabled(void) {
         }
 
 static inline const char *ansi_underline(void) {
-        return underline_enabled() ? ANSI_UNDERLINE : ANSI_NORMAL;
+        return underline_enabled() ? ANSI_UNDERLINE : "";
 }
 
 static inline const char *ansi_add_underline(void) {