Removed redundant check before closing the file handle

This commit is contained in:
Frank
2026-01-05 19:26:39 +01:00
committed by GitHub
parent 8e27fe4c0c
commit a870474b49

View File

@@ -38,7 +38,7 @@ void closeFile() {
DEBUGFS_PRINT(F("Close -> ")); DEBUGFS_PRINT(F("Close -> "));
uint32_t s = millis(); uint32_t s = millis();
#endif #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); DEBUGFS_PRINTF("took %lu ms\n", millis() - s);
doCloseFile = false; doCloseFile = false;
} }