diff options
Diffstat (limited to 'contrib/ltree')
| -rw-r--r-- | contrib/ltree/crc32.c | 4 | ||||
| -rw-r--r-- | contrib/ltree/ltree_io.c | 10 | ||||
| -rw-r--r-- | contrib/ltree/ltxtquery_io.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/contrib/ltree/crc32.c b/contrib/ltree/crc32.c index c114540181..8f37f47fe2 100644 --- a/contrib/ltree/crc32.c +++ b/contrib/ltree/crc32.c @@ -1,6 +1,6 @@ /* Both POSIX and CRC32 checksums */ -/* $PostgreSQL: pgsql/contrib/ltree/crc32.c,v 1.6 2006/03/11 04:38:29 momjian Exp $ */ +/* $PostgreSQL: pgsql/contrib/ltree/crc32.c,v 1.7 2006/09/22 21:39:57 tgl Exp $ */ #include <sys/types.h> #include <stdio.h> @@ -8,7 +8,7 @@ #ifdef LOWER_NODE #include <ctype.h> -#define TOLOWER(x) tolower(x) +#define TOLOWER(x) tolower((unsigned char) (x)) #else #define TOLOWER(x) (x) #endif diff --git a/contrib/ltree/ltree_io.c b/contrib/ltree/ltree_io.c index c147887703..eb22894079 100644 --- a/contrib/ltree/ltree_io.c +++ b/contrib/ltree/ltree_io.c @@ -1,7 +1,7 @@ /* * in/out function for ltree and lquery * Teodor Sigaev <teodor@stack.net> - * $PostgreSQL: pgsql/contrib/ltree/ltree_io.c,v 1.12 2006/03/11 04:38:29 momjian Exp $ + * $PostgreSQL: pgsql/contrib/ltree/ltree_io.c,v 1.13 2006/09/22 21:39:57 tgl Exp $ */ #include "ltree.h" @@ -332,7 +332,7 @@ lquery_in(PG_FUNCTION_ARGS) { if (*ptr == ',') state = LQPRS_WAITSNUM; - else if (isdigit((unsigned int) *ptr)) + else if (isdigit((unsigned char) *ptr)) { curqlevel->low = atoi(ptr); state = LQPRS_WAITND; @@ -342,7 +342,7 @@ lquery_in(PG_FUNCTION_ARGS) } else if (state == LQPRS_WAITSNUM) { - if (isdigit((unsigned int) *ptr)) + if (isdigit((unsigned char) *ptr)) { curqlevel->high = atoi(ptr); state = LQPRS_WAITCLOSE; @@ -359,7 +359,7 @@ lquery_in(PG_FUNCTION_ARGS) { if (*ptr == '}') state = LQPRS_WAITEND; - else if (!isdigit((unsigned int) *ptr)) + else if (!isdigit((unsigned char) *ptr)) UNCHAR; } else if (state == LQPRS_WAITND) @@ -371,7 +371,7 @@ lquery_in(PG_FUNCTION_ARGS) } else if (*ptr == ',') state = LQPRS_WAITSNUM; - else if (!isdigit((unsigned int) *ptr)) + else if (!isdigit((unsigned char) *ptr)) UNCHAR; } else if (state == LQPRS_WAITEND) diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c index 1142bb3fe3..ca6325adf7 100644 --- a/contrib/ltree/ltxtquery_io.c +++ b/contrib/ltree/ltxtquery_io.c @@ -1,7 +1,7 @@ /* * txtquery io * Teodor Sigaev <teodor@stack.net> - * $PostgreSQL: pgsql/contrib/ltree/ltxtquery_io.c,v 1.11 2006/03/11 04:38:29 momjian Exp $ + * $PostgreSQL: pgsql/contrib/ltree/ltxtquery_io.c,v 1.12 2006/09/22 21:39:57 tgl Exp $ */ #include "ltree.h" @@ -81,7 +81,7 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, uint1 *lenval = 1; *flag = 0; } - else if (!isspace((unsigned int) *(state->buf))) + else if (!isspace((unsigned char) *(state->buf))) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("operand syntax error"))); |
