From 019e5ab4fabfb476e39a21a80c4943d3d39f8bc5 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Fri, 28 Jan 2022 02:35:08 +0800 Subject: [PATCH] [cli] do not update aError which is not read (#7365) This commit avoid setting aError which is not read. --- src/cli/cli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 5370b7595..f0fb03472 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -4712,7 +4712,7 @@ void Interpreter::HandleDiagnosticGetResponse(otError aError, OutputLine(""); // Output Network Diagnostic TLV values in standard YAML format. - while ((aError = otThreadGetNextDiagnosticTlv(aMessage, &iterator, &diagTlv)) == OT_ERROR_NONE) + while (otThreadGetNextDiagnosticTlv(aMessage, &iterator, &diagTlv) == OT_ERROR_NONE) { switch (diagTlv.mType) {