diff mbox series

notifier: fix termination string when console is n ot used

Message ID 20201211152302.202702-1-sbabic@denx.de
State Accepted
Headers show
Series notifier: fix termination string when console is n ot used | expand

Commit Message

Stefano Babic Dec. 11, 2020, 3:23 p.m. UTC
Termination string for colors was wrongly set to '0' instead of '\0',
resulting in garbage in log files.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/notifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/core/notifier.c b/core/notifier.c
index c3a7376..68447f2 100644
--- a/core/notifier.c
+++ b/core/notifier.c
@@ -281,7 +281,7 @@  static void console_notifier (RECOVERY_STATUS status, int error, int level, cons
 	if (console_ansi_colors)
 		set_console_color(level, color, sizeof(color));
 	else
-		color[0] = '0';
+		color[0] = '\0';
 
 	switch (level) {
 	case ERRORLEVEL: