From 93f892bdbef93ea63d0e9e926fe78d08707d41ba Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 7 Jul 2017 21:40:07 +0800 Subject: [PATCH] [tests] Fix some unit tests random fail issue (#1966) --- src/core/meshcop/dataset.cpp | 1 + tests/unit/test_platform.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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)