Skip to content

Commit 021e2c6

Browse files
author
Jyri Sarha
committed
debug_stream: text_msg: exception: Skip useless " ** " prefix
Skip useless " ** " prefix from exception dumps to save byte is in the debug_stream buffer. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent cbb0e75 commit 021e2c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/debug/debug_stream/debug_stream_text_msg.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ static void ds_exception_dump(const char *format, va_list args)
103103
if (format[0] == '\0')
104104
return;
105105

106+
/* Skip useless " ** " prefix to save bytes */
107+
if (strlen(format) >= 4 &&
108+
format[0] == ' ' && format[1] == '*' && format[2] == '*' && format[3] == ' ')
109+
format += 4;
110+
106111
len = vsnprintf(ds_buf[cpu].text + ds_pos[cpu], avail, format, args);
107112
if (len < 0) {
108113
ds_pos[cpu] = 0;

0 commit comments

Comments
 (0)