diff options
author | Tom Lane | 2004-10-21 19:28:36 +0000 |
---|---|---|
committer | Tom Lane | 2004-10-21 19:28:36 +0000 |
commit | 380bd04c1658795c77b3b808ee766347188fab5f (patch) | |
tree | cb654e3e510cb1974120cd4d3ea1984b30f3eb32 /contrib/ltree/ltree_gist.c | |
parent | a171fc1a4f37e37c1e80fe3e92a96b2bd37c8f98 (diff) |
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/ltree/ltree_gist.c')
-rw-r--r-- | contrib/ltree/ltree_gist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c index 7630b4f60c3..ec81ce1c183 100644 --- a/contrib/ltree/ltree_gist.c +++ b/contrib/ltree/ltree_gist.c @@ -259,7 +259,7 @@ ltree_penalty(PG_FUNCTION_ARGS) cmpl = ltree_compare(LTG_GETLNODE(origval), LTG_GETLNODE(newval)); cmpr = ltree_compare(LTG_GETRNODE(newval), LTG_GETRNODE(origval)); - *penalty = max(cmpl, 0) + max(cmpr, 0); + *penalty = Max(cmpl, 0) + Max(cmpr, 0); PG_RETURN_POINTER(penalty); } @@ -537,7 +537,7 @@ gist_tqcmp(ltree * t, lquery * q) while (an > 0 && bn > 0) { bl = LQL_FIRST(ql); - if ((res = strncmp(al->name, bl->name, min(al->len, bl->len))) == 0) + if ((res = strncmp(al->name, bl->name, Min(al->len, bl->len))) == 0) { if (al->len != bl->len) return al->len - bl->len; |