logger: replace hardcoded constant in rtt backend

Replace hardcoded report limit of dropped message by macro.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
This commit is contained in:
Pavel Kral 2018-10-25 14:31:17 +02:00 committed by Carles Cufí
commit 9eba380cf7

View file

@ -12,7 +12,8 @@
#if CONFIG_LOG_BACKEND_RTT_MODE_DROP
#define DROP_MSG "\nmessages dropped: 99 \r"
#define DROP_MAX 99
#define DROP_MSG "\nmessages dropped: \r"
#define DROP_MSG_LEN (sizeof(DROP_MSG) - 1)
#else
@ -109,7 +110,7 @@ static int log_backend_rtt_write_drop(void)
}
if (drop_warn) {
int cnt = min(drop_cnt, 99);
int cnt = min(drop_cnt, DROP_MAX);
if (cnt < 10) {
line_buf[DROP_MSG_LEN - 2] = ' ';