From 5f0e36eeb236a507631e9c822e43f742b7b6738a Mon Sep 17 00:00:00 2001 From: Gary Palmer Date: Thu, 2 Jul 2020 15:49:06 -0700 Subject: [PATCH] [mac-frame] remove unused variable in TxFrame::ProcessTransmitAesCcm() (#5185) Eliminated an unused variable discovered when building using IAR. --- src/core/mac/mac_frame.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/mac/mac_frame.cpp b/src/core/mac/mac_frame.cpp index 51d42de4c..1e23c535f 100644 --- a/src/core/mac/mac_frame.cpp +++ b/src/core/mac/mac_frame.cpp @@ -1040,12 +1040,11 @@ void TxFrame::ProcessTransmitAesCcm(const ExtAddress &aExtAddress) uint8_t nonce[Crypto::AesCcm::kNonceSize]; uint8_t tagLength; Crypto::AesCcm aesCcm; - otError error; VerifyOrExit(GetSecurityEnabled(), OT_NOOP); - SuccessOrExit(error = GetSecurityLevel(securityLevel)); - SuccessOrExit(error = GetFrameCounter(frameCounter)); + SuccessOrExit(GetSecurityLevel(securityLevel)); + SuccessOrExit(GetFrameCounter(frameCounter)); Crypto::AesCcm::GenerateNonce(aExtAddress, frameCounter, securityLevel, nonce);