mindex.c

In-memory ordered store and fetch library
git clone git://git.finwo.net/lib/mindex.c
Log | Files | Refs | README | LICENSE

commit 91b53108a5c3ffb702cfd6230e8b4bd6914205e7
parent 887bebb4a743e1eb4d2598341542ee662adc267e
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Sun, 18 Feb 2024 21:14:20 +0100

Purge the old item, not the newly stored item in mindex_set

Diffstat:
Msrc/mindex.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mindex.c b/src/mindex.c @@ -123,7 +123,7 @@ void mindex_set(struct mindex_t *mindex, void *item) { // Item already in there, notify we skipped insertion if (resp->signal & mindex_signal_found) { mindex->items[resp->index] = item; - mindex->purge(item, mindex->udata); + mindex->purge(resp->value, mindex->udata); free(resp); return; }