Standardize on using the Min, Max, and Abs macros that are in our c.h file,
Tom Lane <tgl@sss.pgh.pa.us>
Standardize on using the Min, Max, and Abs macros that are in our c.h file, getting rid of numerous ad-hoc versions that have popped up in various places. Shortens code and avoids conflict with Windows min() and max() macros.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/cube/cube.c | modified | +2 −4 |
| contrib/intarray/_intbig_gist.c | modified | +1 −1 |
| contrib/intarray/_int_gist.c | modified | +1 −1 |
| contrib/intarray/_int.h | modified | +0 −4 |
| contrib/intarray/_int_tool.c | modified | +1 −1 |
| contrib/ltree/_ltree_gist.c | modified | +1 −1 |
| contrib/ltree/ltree_gist.c | modified | +2 −2 |
| contrib/ltree/ltree.h | modified | +0 −9 |
| contrib/ltree/ltree_op.c | modified | +2 −2 |
| contrib/miscutil/misc_utils.c | modified | +5 −8 |
| contrib/miscutil/misc_utils.h | modified | +2 −9 |
| contrib/miscutil/misc_utils.sql.in | modified | +2 −2 |
| contrib/seg/seg.c | modified | +4 −6 |
| contrib/string/string_io.c | modified | +1 −3 |
| contrib/tsearch2/gistidx.c | modified | +1 −1 |
| contrib/tsearch2/gistidx.h | modified | +0 −2 |
| contrib/tsearch2/rank.c | modified | +1 −1 |
| contrib/tsearch/gistidx.c | modified | +1 −1 |
| contrib/tsearch/gistidx.h | modified | +0 −5 |
| src/backend/postmaster/postmaster.c | modified | +2 −2 |
| src/interfaces/libpq/fe-exec.c | modified | +2 −7 |
| src/test/regress/regress.c | modified | +3 −5 |