fe_utils: Sprinkle some pg_malloc_object() and pg_malloc_array()
Michael Paquier <michael@paquier.xyz>
fe_utils: Sprinkle some pg_malloc_object() and pg_malloc_array() The idea is to encourage more the use of these allocation routines across the tree, as these offer stronger type safety guarantees than pg_malloc() & friends (type cast in the result, sizeof() embedded). This commit updates some code paths of src/fe_utils/. This commit is similar to 31d3847a37be. Author: Henrik TJ <henrik@0x48.dk> Reviewed-by: Andreas Karlsson <andreas@proxel.se> Discussion: https://postgr.es/m/6df1b64e-1314-9afd-41a3-3fefb76225e1@0x48.dk
Files
| Path | Change | +/− |
|---|---|---|
| src/fe_utils/conditional.c | modified | +2 −2 |
| src/fe_utils/print.c | modified | +24 −24 |
| src/fe_utils/psqlscan.l | modified | +4 −4 |
| src/fe_utils/simple_list.c | modified | +2 −2 |
Discussion
- Use pg_malloc macros in src/fe_utils 6 messages · 2026-02-18 → 2026-03-03