mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 08:37:47 +00:00
[cli] fix false alarm when printing empty line (#6499)
The OpenThread cli may print false alarms when calling
`OutputLine("")`. Fix accordingly.
This commit is contained in:
@@ -332,7 +332,7 @@ static int CliUartOutput(void *aContext, const char *aFormat, va_list aArguments
|
||||
if (sTxLength == 0)
|
||||
{
|
||||
rval = vsnprintf(sTxBuffer, kTxBufferSize, aFormat, aArguments);
|
||||
VerifyOrExit(rval > 0 && rval < kTxBufferSize, otLogWarnPlat("Failed to format CLI output `%s`", aFormat));
|
||||
VerifyOrExit(rval >= 0 && rval < kTxBufferSize, otLogWarnPlat("Failed to format CLI output `%s`", aFormat));
|
||||
sTxHead = 0;
|
||||
sTxLength = static_cast<uint16_t>(rval);
|
||||
sSendLength = 0;
|
||||
|
||||
Reference in New Issue
Block a user