]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/search/: lsearch_T(): Don't return anything
authorAlejandro Colomar <alx@kernel.org>
Mon, 17 Nov 2025 19:50:31 +0000 (20:50 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sat, 6 Dec 2025 03:22:45 +0000 (21:22 -0600)
We don't use this value.  This silences a diagnostic about the unused
return value.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/search/l/lsearch.h

index 421c4346afe45baec1485f81143a8503443b98ab..04337c31523f45a2d73fb0c2497ca6d218281350 100644 (file)
 
 // lsearch_T - linear search-and-insert type-safe
 #define lsearch_T(T, ...)            lsearch_T_(typeas(T), __VA_ARGS__)
-#define lsearch_T_(T, k, a, n, cmp)                                   \
-({                                                                    \
+#define lsearch_T_(T, k, a, n, cmp)  do                               \
+                                                                    \
        _Generic(k, T *: (void)0, const T *: (void)0);                \
        _Generic(a, T *: (void)0);                                    \
-       (T *){lsearch(k, a, n, sizeof(T), cmp)};                      \
-})
+       lsearch(k, a, n, sizeof(T), cmp);                             \
+} while (0)
 
 #define LSEARCH(T, ...)  lsearch_T(T, __VA_ARGS__, CMP(T))