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>
This commit is contained in:
parent
8521b43546
commit
ad8778d019
2 changed files with 16 additions and 16 deletions
|
@ -520,14 +520,14 @@ static inline bool is_region_page_aligned(void *addr, size_t size)
|
|||
#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
|
||||
|
|
16
kernel/mmu.c
16
kernel/mmu.c
|
@ -58,14 +58,14 @@ static bool page_frames_initialized;
|
|||
#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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue