You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/11/27 13:11:13 UTC
[incubator-nuttx-apps] 03/06: testing/fstest: Don't reuse the deleted name
This is an automated email from the ASF dual-hosted git repository.
gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 7c4ddaeedeb96793d4b3a8d0d0749f89e1aee7c7
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Nov 9 01:54:04 2021 +0800
testing/fstest: Don't reuse the deleted name
to simplify the root cause analysis
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
testing/fstest/fstest_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testing/fstest/fstest_main.c b/testing/fstest/fstest_main.c
index c8d7cc6..94ad7db 100644
--- a/testing/fstest/fstest_main.c
+++ b/testing/fstest/fstest_main.c
@@ -200,7 +200,7 @@ static bool fstest_checkexist(FAR struct fstest_filedesc_s *file)
for (i = 0; i < CONFIG_TESTING_FSTEST_MAXOPEN; i++)
{
- if (!g_files[i].deleted && &g_files[i] != file &&
+ if (&g_files[i] != file && g_files[i].name &&
strcmp(g_files[i].name, file->name) == 0)
{
ret = true;