diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-12-06 08:43:27 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-12-06 08:43:40 -0500 |
commit | 0c18b5b15ed6e78cc27580518ae29f20ff23da65 (patch) | |
tree | 7a468237049f1db65d9c6ffed5f0c89dc7e4d271 /src/cli/stasis_indexer/callbacks.c | |
parent | 47b0eb0ffc358393238a2e4ec8600f5a862a99b5 (diff) | |
download | stasis-0c18b5b15ed6e78cc27580518ae29f20ff23da65.tar.gz |
Fix pointers to Delivery struct
* Dynamic allocation only. I'm completely fed up with "lost" addresses.
Diffstat (limited to 'src/cli/stasis_indexer/callbacks.c')
-rw-r--r-- | src/cli/stasis_indexer/callbacks.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |