Skip to content

Commit

Permalink
Removed invalid check of outlen (#21792)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneJosefsen authored and pull[bot] committed Aug 21, 2023
1 parent 4ac9258 commit 1085838
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 1 addition & 4 deletions src/platform/cc32xx/CC32XXConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1085838

Please sign in to comment.