From: Collin Funk Date: Sat, 12 Apr 2025 22:03:41 +0000 (-0700) Subject: aligned-malloc tests: Simplify a macro definition and improve comment. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=ef8651fe73502a91c53e68705e25adfd105bc364;p=gnulib.git aligned-malloc tests: Simplify a macro definition and improve comment. Suggested by Bruno Haible. * tests/test-aligned-malloc.c (ALIGNMENT): Undefine without checking. Mention that the #undef is for AIX which defines it beforehand in . --- diff --git a/ChangeLog b/ChangeLog index f94208c5f7..d8b202df02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2025-04-12 Collin Funk + aligned-malloc tests: Simplify a macro definition and improve comment. + Suggested by Bruno Haible. + * tests/test-aligned-malloc.c (ALIGNMENT): Undefine without checking. + Mention that the #undef is for AIX which defines it beforehand in + . + immutable: Simplify a macro definition and improve comment. Suggested by Bruno Haible. * lib/immutable.c (ALIGNMENT): Undefine without checking. Mention that diff --git a/tests/test-aligned-malloc.c b/tests/test-aligned-malloc.c index e577804d22..1a1795f051 100644 --- a/tests/test-aligned-malloc.c +++ b/tests/test-aligned-malloc.c @@ -22,10 +22,8 @@ #include #include -/* Avoid redefinition on AIX. */ -#ifdef ALIGNMENT -# undef ALIGNMENT -#endif +/* AIX defines a macro ALIGNMENT in . Undefine it. */ +#undef ALIGNMENT #define ALIGNMENT 4 #define aligned_malloc aligned4_malloc #define aligned_free aligned4_free