diff --git a/src/core/meshcop/dataset.cpp b/src/core/meshcop/dataset.cpp index 9140b74ea..4f19b6920 100644 --- a/src/core/meshcop/dataset.cpp +++ b/src/core/meshcop/dataset.cpp @@ -52,6 +52,7 @@ Dataset::Dataset(const Tlv::Type aType) : mLength(0), mType(aType) { + memset(mTlvs, 0, sizeof(mTlvs)); } void Dataset::Clear(void) diff --git a/tests/unit/test_platform.cpp b/tests/unit/test_platform.cpp index 0fb701f65..dacafde17 100644 --- a/tests/unit/test_platform.cpp +++ b/tests/unit/test_platform.cpp @@ -495,7 +495,7 @@ exit: (void)aValue; (void)aValueLength; - return OT_ERROR_NONE; + return OT_ERROR_NOT_FOUND; } otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength)