diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-03-06 21:19:00 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-03-06 21:40:10 +0200 |
commit | a0c2fa9b5cfaf9595e8809a68eec929a5052834e (patch) | |
tree | 939f03940d5e9043b1a8a1957eea3f3a98ec5538 /src | |
parent | 94ae6ba74dfc626efa271461902db1be35d2a551 (diff) | |
download | postgresql-a0c2fa9b5cfaf9595e8809a68eec929a5052834e.tar.gz postgresql-a0c2fa9b5cfaf9595e8809a68eec929a5052834e.zip |
isdigit() needs an unsigned char argument.
Per the C standard, the routine should be passed an int, with a value that's
representable as an unsigned char or EOF. Passing a signed char is wrong,
because a negative value is not representable as an unsigned char.
Unfortunately no compiler warns about that.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/adt/timestamp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 8ba3209fda5..ce30bb6e9fa 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -511,7 +511,7 @@ parse_sane_timezone(struct pg_tm *tm, text *zone) * as invalid, it's enough to disallow having a digit in the first * position of our input string. */ - if (isdigit(*tzname)) + if (isdigit((unsigned char) *tzname)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid input syntax for numeric time zone: \"%s\"", |