From 79aa314352d99a44ca6ab5c935d4e63b3cfc51c3 Mon Sep 17 00:00:00 2001 From: Richard Thier Date: Thu, 10 Oct 2024 00:04:22 +0200 Subject: [PATCH] commit retval --- simap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" */