Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1002, remove extra newlines in utassert logs #1003

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ut_assert/src/utbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void UT_BSP_DoText(uint8 MessageType, const char *OutputMessage)
{
const char *Prefix;
char Buffer[16];
size_t MsgLen;
uint32 TermModeBits = OS_BSP_CONSOLEMODE_NORMAL;
uint32 MsgEnabled = BSP_UT_Global.CurrVerbosity >> MessageType;

Expand Down Expand Up @@ -182,8 +183,12 @@ void UT_BSP_DoText(uint8 MessageType, const char *OutputMessage)
}

OS_BSP_ConsoleOutput_Impl(" ", 1);
OS_BSP_ConsoleOutput_Impl(OutputMessage, strlen(OutputMessage));
OS_BSP_ConsoleOutput_Impl("\n", 1);
MsgLen = strlen(OutputMessage);
OS_BSP_ConsoleOutput_Impl(OutputMessage, MsgLen);
if (MsgLen == 0 || OutputMessage[MsgLen - 1] != '\n')
{
OS_BSP_ConsoleOutput_Impl("\n", 1);
}

OS_BSP_Unlock_Impl();
}
Expand Down