From a27b691e2903a886be640db801677f6f988d3793 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 3 Dec 2000 20:45:40 +0000 Subject: Ensure that all uses of 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. --- src/backend/utils/adt/int8.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/adt/int8.c') 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'); -- cgit v1.2.3