From 380bd04c1658795c77b3b808ee766347188fab5f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 21 Oct 2004 19:28:36 +0000 Subject: 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. --- contrib/string/string_io.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'contrib/string/string_io.c') 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); -- cgit v1.2.3