[simulation] fix error handling in simulation flash APIs (#5500)

This commit is contained in:
kangping
2020-09-17 23:19:42 -07:00
committed by GitHub
parent 1ece16dba2
commit 3820c3b6ed
+2 -2
View File
@@ -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++)