From 82ac031f00dbd153554436debcec0d8c704c8d10 Mon Sep 17 00:00:00 2001 From: Andrei Alexeyev Date: Sun, 16 Jun 2024 21:53:12 +0200 Subject: [PATCH] stagex: infinity_net: use sort_r() instead of qsort_r() --- src/stages/stagex/spells/infinity_net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stages/stagex/spells/infinity_net.c b/src/stages/stagex/spells/infinity_net.c index 03e7e47af..b1b210381 100644 --- a/src/stages/stagex/spells/infinity_net.c +++ b/src/stages/stagex/spells/infinity_net.c @@ -8,6 +8,8 @@ #include "spells.h" +#include "util/sort_r.h" + typedef struct LatticeNode LatticeNode; struct LatticeNode { cmplx ofs; @@ -100,7 +102,7 @@ static void init_idxmap(int num_nodes, int idxmap[num_nodes], LatticeNode nodes[ idxmap[i] = i; } - qsort_r(idxmap, num_nodes, sizeof(*idxmap), idxmap_cmp, nodes); + sort_r(idxmap, num_nodes, sizeof(*idxmap), idxmap_cmp, nodes); } #define MAX_RANK 0xffffffff