]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/search/, lib/, src/: Add a type parameter to the type-safe macros
authorAlejandro Colomar <alx@kernel.org>
Fri, 14 Nov 2025 00:20:41 +0000 (01:20 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 5 Dec 2025 14:34:32 +0000 (08:34 -0600)
commitf45082a1e94c69eb9dcc4e1844da0f3d987d392f
tree2e3468c3c8f79421c518c4a9cd4e3e9bb2105967
parent97380c811a314d2ea8684f60c1acec69a44accd3
lib/search/, lib/, src/: Add a type parameter to the type-safe macros

This simplifies the implementation, allowing us to use _Generic(3) to
replace _Static_assert(3), is_same_type(), and local variables.

Local variables in macros can cause issues when nesting such macros.

This also makes the code more readable, by having the type explicitly
stated at call site.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/addgrps.c
lib/adds.h
lib/search/l/lfind.h
lib/search/l/lsearch.h
lib/search/sort/qsort.h
src/newgrp.c