aboutsummaryrefslogtreecommitdiff
path: root/contrib/string/string_io.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-10-21 19:28:36 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-10-21 19:28:36 +0000
commit380bd04c1658795c77b3b808ee766347188fab5f (patch)
treecb654e3e510cb1974120cd4d3ea1984b30f3eb32 /contrib/string/string_io.c
parenta171fc1a4f37e37c1e80fe3e92a96b2bd37c8f98 (diff)
downloadpostgresql-380bd04c1658795c77b3b808ee766347188fab5f.tar.gz
postgresql-380bd04c1658795c77b3b808ee766347188fab5f.zip
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.
Diffstat (limited to 'contrib/string/string_io.c')
-rw-r--r--contrib/string/string_io.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/string/string_io.c b/contrib/string/string_io.c
index 059dfa08947..a6f49e9afe7 100644
--- a/contrib/string/string_io.c
+++ b/contrib/string/string_io.c
@@ -20,8 +20,6 @@
/* define this if you want to see iso-8859 characters */
#define ISO8859
-#undef MIN
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define VALUE(char) ((char) - '0')
#define DIGIT(val) ((val) + '0')
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
@@ -229,7 +227,7 @@ string_input(unsigned char *str, int size, int hdrsize, int *rtn_size)
else
/* result has variable length with maximum size */
if (size < 0)
- size = MIN(len, -size) + 1;
+ size = Min(len, -size) + 1;
result = (char *) palloc(hdrsize + size);
memset(result, 0, hdrsize + size);