From cd632c983e588ca77eafc6e932670c075cbc892c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 4 Jan 2004 04:17:14 +0000 Subject: Fix portability bugs: char values passed to functions must be cast to unsigned char. We have learned this the hard way before. --- src/interfaces/ecpg/compatlib/informix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/interfaces/ecpg/compatlib/informix.c') diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index 562ab9282ee..5773c45abee 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -464,7 +464,7 @@ rstrdate(char *str, date * d) for (i=0,j=0; i < 10; i++ ) { /* ignore non-digits */ - if ( isdigit(str[i]) ) + if ( isdigit((unsigned char) str[i]) ) { /* j only increments if it is a digit */ @@ -910,8 +910,8 @@ void rupshift(char *str) { for (; *str != '\0'; str++) - if (islower(*str)) - *str = toupper(*str); + if (islower((unsigned char) *str)) + *str = toupper((unsigned char) *str); return; } -- cgit v1.2.3