From 0c18b5b15ed6e78cc27580518ae29f20ff23da65 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 6 Dec 2024 08:43:27 -0500 Subject: Fix pointers to Delivery struct * Dynamic allocation only. I'm completely fed up with "lost" addresses. --- src/cli/stasis_indexer/callbacks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cli/stasis_indexer/callbacks.c') diff --git a/src/cli/stasis_indexer/callbacks.c b/src/cli/stasis_indexer/callbacks.c index 4790e09..0186e1c 100644 --- a/src/cli/stasis_indexer/callbacks.c +++ b/src/cli/stasis_indexer/callbacks.c @@ -23,9 +23,9 @@ int callback_sort_deliveries_cmpfn(const void *a, const void *b) { // qsort callback to sort dynamically allocated delivery contexts by compact python version int callback_sort_deliveries_dynamic_cmpfn(const void *a, const void *b) { - const struct Delivery *delivery1 = *(struct Delivery **) a; + const struct Delivery *delivery1 = a; const size_t delivery1_python = strtoul(delivery1->meta.python_compact, NULL, 10); - const struct Delivery *delivery2 = *(struct Delivery **) b; + const struct Delivery *delivery2 = b; const size_t delivery2_python = strtoul(delivery2->meta.python_compact, NULL, 10); if (delivery2_python > delivery1_python) { -- cgit