summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2025-10-01 18:50:28 +1300
committerDavid Rowley <drowley@postgresql.org>2025-10-01 18:50:28 +1300
commit3a661580685964dd2ca192306a202934f268fc5c (patch)
tree82219ecf231127873a896560cfcd04db93f215eb /src
parent9952f6c05a40976063c3e2a4482873ec710f01a2 (diff)
Minor fixups of test_bitmapset.c
The macro's comment had become outdated from a prior version and there's now no longer a need for the do/while loop (or my misplaced semi-colon). Author: David Rowley <dgrowleyml@gmail.com> Discussion: https://postgr.es/m/CAApHDvr+P454SP_LDvB=bViPAbDQhV1Jmg5M55GEKz0d3z25NA@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/test/modules/test_bitmapset/test_bitmapset.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/test/modules/test_bitmapset/test_bitmapset.c b/src/test/modules/test_bitmapset/test_bitmapset.c
index 6cf8a257187..0d6c2e7aa1b 100644
--- a/src/test/modules/test_bitmapset/test_bitmapset.c
+++ b/src/test/modules/test_bitmapset/test_bitmapset.c
@@ -95,15 +95,11 @@ PG_FUNCTION_INFO_V1(test_random_operations);
(PG_ARGISNULL(n) ? NULL : TEXT_TO_BITMAPSET(PG_GETARG_TEXT_PP(n)))
/*
- * Helper macro to handle converting sets back to text, freeing the set and
- * returning the resulting text representation of the set. Beware of double
- * evaluation hazard of 'bms'.
+ * Helper macro to handle converting sets back to text, returning the
+ * resulting text representation of the set.
*/
#define PG_RETURN_BITMAPSET_AS_TEXT(bms) \
- do { \
- text *result = BITMAPSET_TO_TEXT(bms); \
- PG_RETURN_TEXT_P(result); \
- } while (0);
+ PG_RETURN_TEXT_P(BITMAPSET_TO_TEXT(bms))
/*
* Individual test functions for each bitmapset API function