From b38fdec86fab1d06800d81f0d7252c71accac4b5 Mon Sep 17 00:00:00 2001 From: Clemens Kirchgatterer Date: Tue, 5 Mar 2019 12:28:48 +0100 Subject: [PATCH] Remove redundant check for zero size SPIFFS partition The check if the end address of the SPIFFS partition is smaller or equal to the start of the partition breaks sketches that are linked with zero size SPIFFS linker scripts, but create their own SPIFFS partition later at arbitrary flash locations. But this check can safely be removed, because the check if the the SPIFFS partition is of size 0 is done a few lines further down anyway. --- cores/esp8266/spiffs_api.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cores/esp8266/spiffs_api.h b/cores/esp8266/spiffs_api.h index 4a32b8ec09..52ebf2ade2 100644 --- a/cores/esp8266/spiffs_api.h +++ b/cores/esp8266/spiffs_api.h @@ -126,10 +126,6 @@ class SPIFFSImpl : public FSImpl bool begin() override { -#if defined(ARDUINO) && !defined(CORE_MOCK) - if (&_SPIFFS_end <= &_SPIFFS_start) - return false; -#endif if (SPIFFS_mounted(&_fs) != 0) { return true; }