From a870474b49900fe5c5ebd6c8ef06a3777feb3241 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Mon, 5 Jan 2026 19:26:39 +0100 Subject: [PATCH] Removed redundant check before closing the file handle --- wled00/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/file.cpp b/wled00/file.cpp index f65bacb4..ee107c66 100644 --- a/wled00/file.cpp +++ b/wled00/file.cpp @@ -38,7 +38,7 @@ void closeFile() { DEBUGFS_PRINT(F("Close -> ")); uint32_t s = millis(); #endif - if (f) f.close(); // only close if we have an open file + f.close(); // "if (f)" check is aleady done inside f.close(), and f cannot be nullptr -> no need for double checking before closing the file handle. DEBUGFS_PRINTF("took %lu ms\n", millis() - s); doCloseFile = false; }