minmax: New module, safe min and max macros
Add a 'minmax' module with typesafe macros to compute minimum, maximum and clamping. Inspired by the versions used in the Linux kernel, but using a different implementation based on __builtin_types_compatible_p() and the build_assert module. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Showing
ccan/minmax/LICENSE
0 → 120000
ccan/minmax/_info
0 → 100644
ccan/minmax/minmax.h
0 → 100644
ccan/minmax/test/run.c
0 → 100644
Please register or sign in to comment