diff --git a/libraries/AP_HAL_SITL/Util.cpp b/libraries/AP_HAL_SITL/Util.cpp index ce51bd8fd3..1805e21720 100644 --- a/libraries/AP_HAL_SITL/Util.cpp +++ b/libraries/AP_HAL_SITL/Util.cpp @@ -85,7 +85,7 @@ bool HALSITL::Util::get_system_id(char buf[50]) return get_system_id_unformatted((uint8_t *)buf, len); } -#ifdef ENABLE_HEAP +#if ENABLE_HEAP void *HALSITL::Util::allocate_heap_memory(size_t size) { struct heap *new_heap = (struct heap*)malloc(sizeof(struct heap)); diff --git a/libraries/AP_HAL_SITL/Util.h b/libraries/AP_HAL_SITL/Util.h index cbfbeda556..ac73c6a365 100644 --- a/libraries/AP_HAL_SITL/Util.h +++ b/libraries/AP_HAL_SITL/Util.h @@ -43,7 +43,7 @@ public: bool get_system_id_unformatted(uint8_t buf[], uint8_t &len) override; void dump_stack_trace(); -#ifdef ENABLE_HEAP +#if ENABLE_HEAP // heap functions, note that a heap once alloc'd cannot be dealloc'd void *allocate_heap_memory(size_t size) override; void *heap_realloc(void *heap, void *ptr, size_t old_size, size_t new_size) override; @@ -90,7 +90,7 @@ private: static ToneAlarm_SF _toneAlarm; #endif -#ifdef ENABLE_HEAP +#if ENABLE_HEAP struct heap_allocation_header { size_t allocation_size; // size of allocated block, not including this header };