Use C library functions instead of Abs() for int64
Peter Eisentraut <peter@eisentraut.org>
Use C library functions instead of Abs() for int64 Instead of Abs() for int64, use the C standard functions labs() or llabs() as appropriate. Define a small wrapper around them that matches our definition of int64. (labs() is C90, llabs() is C99.) Reviewed-by: Zhang Mingli <zmlpostgres@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/4beb42b5-216b-bce8-d452-d924d5794c63%40enterprisedb.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/btree_gist/btree_cash.c | modified | +1 −1 |
| contrib/btree_gist/btree_int8.c | modified | +1 −1 |
| src/backend/utils/adt/datetime.c | modified | +4 −4 |
| src/backend/utils/adt/dbsize.c | modified | +1 −1 |
| src/include/c.h | modified | +9 −0 |
Discussion
- get rid of Abs() 3 messages · 2022-10-04