From 3820c3b6ed079e4192af38a29da75acc5bbfc49a Mon Sep 17 00:00:00 2001 From: kangping Date: Fri, 18 Sep 2020 14:19:42 +0800 Subject: [PATCH] [simulation] fix error handling in simulation flash APIs (#5500) --- examples/platforms/simulation/flash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/platforms/simulation/flash.c b/examples/platforms/simulation/flash.c index fe634a85c..561ad45da 100644 --- a/examples/platforms/simulation/flash.c +++ b/examples/platforms/simulation/flash.c @@ -78,10 +78,10 @@ void otPlatFlashInit(otInstance *aInstance) } sFlashFd = open(fileName, O_RDWR | O_CREAT | O_CLOEXEC, 0600); - lseek(sFlashFd, 0, SEEK_SET); - VerifyOrDie(sFlashFd >= 0, OT_EXIT_ERROR_ERRNO); + lseek(sFlashFd, 0, SEEK_SET); + if (create) { for (uint8_t index = 0; index < SWAP_NUM; index++)