INTIME: whitespace fixup and zero context in wc_ReadDirFirst

This commit is contained in:
Elms
2021-03-25 10:50:04 -07:00
parent c3e6195da5
commit 4eb4cecff4
2 changed files with 43 additions and 43 deletions

View File

@ -431,7 +431,7 @@ int wc_ReadDirFirst(ReadDirCtx* ctx, const char* path, char** name)
return BAD_FUNC_ARG;
}
XMEMSET(ctx->name, 0, MAX_FILENAME_SZ);
XMEMSET(ctx, 0, sizeof(ReadDirCtx));
pathLen = (int)XSTRLEN(path);
#ifdef USE_WINDOWS_API
@ -633,7 +633,7 @@ int wc_ReadDirNext(ReadDirCtx* ctx, const char* path, char** name)
}
#elif defined(INTIME_RTOS)
while (FindNextRtFile(&ctx->FindFileData)) {
while (FindNextRtFile(&ctx->FindFileData)) {
if (!(ctx->FindFileData.dwFileAttributes & FILE_ATTR_DIRECTORY)) {
dnameLen = (int)XSTRLEN(ctx->FindFileData.cFileName);
@ -649,7 +649,7 @@ while (FindNextRtFile(&ctx->FindFileData)) {
*name = ctx->name;
return 0;
}
}
}
#elif defined(WOLFSSL_ZEPHYR)
while ((fs_readdir(&ctx->dir, &ctx->entry)) != 0) {