pgsql: Consistently pass an "unsigned char" to ctype.h functions.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Consistently pass an "unsigned char" to ctype.h functions.
Date: 2014-07-06 04:39:16
Message-ID: E1X3eEO-0008Os-9B@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Consistently pass an "unsigned char" to ctype.h functions.

The isxdigit() calls relied on undefined behavior. The isascii() call
was well-defined, but our prevailing style is to include the cast.
Back-patch to 9.4, where the isxdigit() calls were introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/333b7db8b39679acf0665b3fc4ad99cbc14fbba7

Modified Files
--------------
contrib/pg_upgrade/controldata.c | 2 +-
src/backend/utils/adt/json.c | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-07-06 14:01:11 pgsql: Fix decoding of MULTI_INSERTs when rows other than the last are
Previous Message Kevin Grittner 2014-07-05 16:03:00 pgsql: Remove dead typeStruct variable from plpy_spi.c.