]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/adds.h: addslN(): Use QSORT() instead of its pattern
authorAlejandro Colomar <alx@kernel.org>
Thu, 14 Nov 2024 21:08:01 +0000 (22:08 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 24 Jan 2025 13:58:13 +0000 (07:58 -0600)
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/adds.h

index e047d681c5c56f8d52f4d7a1f7beaa223ab137d8..5e4fa2749e6d5e79caa56573e9565179dadbaf92 100644 (file)
@@ -11,9 +11,8 @@
 #include <errno.h>
 #include <limits.h>
 #include <stddef.h>
-#include <stdlib.h>
 
-#include "search/cmp/cmp.h"
+#include "search/sort/qsort.h"
 #include "sizeof.h"
 
 
@@ -56,7 +55,7 @@ addslN(size_t n, long addend[n])
 
        e = errno;
        while (n > 1) {
-               qsort(addend, n, sizeof(addend[0]), cmp_long);
+               QSORT(addend, n);
 
                errno = 0;
                addend[0] = addsl2(addend[0], addend[--n]);