From 3b23befac63c51f374285d270012fef389fa4077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Josefsen?= Date: Wed, 10 Aug 2022 16:57:53 +0200 Subject: [PATCH] Removed invalid check of outlen --- src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp | 5 +---- src/platform/cc32xx/CC32XXConfig.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index 6c3dbef4573f35..09e3393e07b1b1 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -156,10 +156,7 @@ CHIP_ERROR CC13X2_26X2Config::ReadConfigValueBin(Key key, uint8_t * buf, size_t VerifyOrExit(sNvoctpFps.readItem(key.nvID, 0, (uint16_t) len, buf) == NVINTF_SUCCESS, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); - if (outLen) - { - outLen = len; - } + outLen = len; exit: return err; diff --git a/src/platform/cc32xx/CC32XXConfig.cpp b/src/platform/cc32xx/CC32XXConfig.cpp index cdc59cd6d37ada..173b2864e3c2c0 100644 --- a/src/platform/cc32xx/CC32XXConfig.cpp +++ b/src/platform/cc32xx/CC32XXConfig.cpp @@ -378,10 +378,7 @@ CHIP_ERROR CC32XXConfig::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSi VerifyOrReturnError(pEntry != nullptr, CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); pEntry->ReadVal(buf, bufSize); - if (outLen) - { - outLen = pEntry->Len(); - } + outLen = pEntry->Len(); return CHIP_NO_ERROR; }