summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/int8.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-03 20:45:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-03 20:45:40 +0000
commita27b691e2903a886be640db801677f6f988d3793 (patch)
treec68f25c9edef18954e9c5b3d74893f1df87b8871 /src/backend/utils/adt/int8.c
parent4d2a506526ceacab5f75df040596a5287ab40612 (diff)
Ensure that all uses of <ctype.h> functions are applied to unsigned-char
values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
Diffstat (limited to 'src/backend/utils/adt/int8.c')
-rw-r--r--src/backend/utils/adt/int8.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index bc4b64b9ec4..eb49363fae4 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.25 2000/10/24 20:14:35 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.26 2000/12/03 20:45:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -67,15 +67,15 @@ int8in(PG_FUNCTION_ARGS)
* Do our own scan, rather than relying on sscanf which might be
* broken for long long.
*/
- while (*ptr && isspace((int) *ptr)) /* skip leading spaces */
+ while (*ptr && isspace((unsigned char) *ptr)) /* skip leading spaces */
ptr++;
if (*ptr == '-') /* handle sign */
sign = -1, ptr++;
else if (*ptr == '+')
ptr++;
- if (!isdigit((int) *ptr)) /* require at least one digit */
+ if (!isdigit((unsigned char) *ptr)) /* require at least one digit */
elog(ERROR, "Bad int8 external representation \"%s\"", str);
- while (*ptr && isdigit((int) *ptr)) /* process digits */
+ while (*ptr && isdigit((unsigned char) *ptr)) /* process digits */
{
int64 newtmp = tmp * 10 + (*ptr++ - '0');