diff --git a/libraries/AP_HAL_ESP32/Util.cpp b/libraries/AP_HAL_ESP32/Util.cpp index d232ff8907..2eab971532 100644 --- a/libraries/AP_HAL_ESP32/Util.cpp +++ b/libraries/AP_HAL_ESP32/Util.cpp @@ -90,7 +90,7 @@ void Util::free_type(void *ptr, size_t size, AP_HAL::Util::Memory_Type mem_type) } -#ifdef ENABLE_HEAP +#if ENABLE_HEAP void *Util::allocate_heap_memory(size_t size) { diff --git a/libraries/AP_HAL_ESP32/Util.h b/libraries/AP_HAL_ESP32/Util.h index fcf83ec3b6..8e9ba9dc94 100644 --- a/libraries/AP_HAL_ESP32/Util.h +++ b/libraries/AP_HAL_ESP32/Util.h @@ -34,7 +34,7 @@ public: void *malloc_type(size_t size, AP_HAL::Util::Memory_Type mem_type) override; void free_type(void *ptr, size_t size, AP_HAL::Util::Memory_Type mem_type) override; -#ifdef ENABLE_HEAP +#if ENABLE_HEAP // heap functions, note that a heap once alloc'd cannot be dealloc'd virtual void *allocate_heap_memory(size_t size) override; virtual void *heap_realloc(void *heap, void *ptr, size_t old_size, size_t new_size) override; @@ -85,7 +85,7 @@ private: FlashBootloader flash_bootloader() override; #endif -#ifdef ENABLE_HEAP +#if ENABLE_HEAP // static memory_heap_t scripting_heap; #endif // ENABLE_HEAP