diff --git a/simap.h b/simap.h index 2955228..bbaf8a8 100644 --- a/simap.h +++ b/simap.h @@ -231,8 +231,9 @@ static inline void* simap(void *amap_instance, AMAP_OP op, const char *key, void simap_instance *map = (simap_instance *) amap_instance; if(op == AMAP_ERASE) { + map->prev_usage_end = (uint32_t) -1; map->usage_end = 0; - return NULL; + return (void *)((uint8_t)(NULL) - 1L); } /* Search for the key - also needed for SET in order to "re-set" */