Skip to content

Commit

Permalink
Correct usage of ConfigValueExists
Browse files Browse the repository at this point in the history
  • Loading branch information
pankore committed Nov 25, 2021
1 parent 8b54ba0 commit b4dbcea
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/platform/Ameba/AmebaConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,7 @@ CHIP_ERROR AmebaConfig::ClearConfigValue(Key key)

bool AmebaConfig::ConfigValueExists(Key key)
{
int32_t exist;
CHIP_ERROR err;

exist = checkExist(key.Namespace, key.Name);

if (exist == 1)
err = CHIP_NO_ERROR;
else
err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;

return (err == CHIP_NO_ERROR);
return checkExist(key.Namespace, key.Name);
}

CHIP_ERROR AmebaConfig::EnsureNamespace(const char * ns)
Expand Down

0 comments on commit b4dbcea

Please sign in to comment.