coding guidelines: comply with MISRA C:2012 Rule 4.1
MISRA C:2012 Rule 4.1 (Octal and hexadecimal escape sequences shall be
terminated.)
Use string literal concatenation to properly terminate hexadecimal
escape sequences.
Signed-off-by: Abramo Bagnara <abramo.bagnara@bugseng.com>
Signed-off-by: Simon Hein <SHein@baumer.com>
diff --git a/arch/x86/core/x86_mmu.c b/arch/x86/core/x86_mmu.c
index 29dcbbc..8e78a37 100644
--- a/arch/x86/core/x86_mmu.c
+++ b/arch/x86/core/x86_mmu.c
@@ -520,14 +520,14 @@
#define COLOR_PAGE_TABLES 1
#if COLOR_PAGE_TABLES
-#define ANSI_DEFAULT "\x1B[0m"
-#define ANSI_RED "\x1B[1;31m"
-#define ANSI_GREEN "\x1B[1;32m"
-#define ANSI_YELLOW "\x1B[1;33m"
-#define ANSI_BLUE "\x1B[1;34m"
-#define ANSI_MAGENTA "\x1B[1;35m"
-#define ANSI_CYAN "\x1B[1;36m"
-#define ANSI_GREY "\x1B[1;90m"
+#define ANSI_DEFAULT "\x1B" "[0m"
+#define ANSI_RED "\x1B" "[1;31m"
+#define ANSI_GREEN "\x1B" "[1;32m"
+#define ANSI_YELLOW "\x1B" "[1;33m"
+#define ANSI_BLUE "\x1B" "[1;34m"
+#define ANSI_MAGENTA "\x1B" "[1;35m"
+#define ANSI_CYAN "\x1B" "[1;36m"
+#define ANSI_GREY "\x1B" "[1;90m"
#define COLOR(x) printk(_CONCAT(ANSI_, x))
#else
diff --git a/kernel/mmu.c b/kernel/mmu.c
index 032acb8..4e1d8fe 100644
--- a/kernel/mmu.c
+++ b/kernel/mmu.c
@@ -58,14 +58,14 @@
#define COLOR_PAGE_FRAMES 1
#if COLOR_PAGE_FRAMES
-#define ANSI_DEFAULT "\x1B[0m"
-#define ANSI_RED "\x1B[1;31m"
-#define ANSI_GREEN "\x1B[1;32m"
-#define ANSI_YELLOW "\x1B[1;33m"
-#define ANSI_BLUE "\x1B[1;34m"
-#define ANSI_MAGENTA "\x1B[1;35m"
-#define ANSI_CYAN "\x1B[1;36m"
-#define ANSI_GREY "\x1B[1;90m"
+#define ANSI_DEFAULT "\x1B" "[0m"
+#define ANSI_RED "\x1B" "[1;31m"
+#define ANSI_GREEN "\x1B" "[1;32m"
+#define ANSI_YELLOW "\x1B" "[1;33m"
+#define ANSI_BLUE "\x1B" "[1;34m"
+#define ANSI_MAGENTA "\x1B" "[1;35m"
+#define ANSI_CYAN "\x1B" "[1;36m"
+#define ANSI_GREY "\x1B" "[1;90m"
#define COLOR(x) printk(_CONCAT(ANSI_, x))
#else