summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/compatlib/informix.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-04 04:17:01 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-04 04:17:01 +0000
commit4351f8823df53cffdea5960c93e867f498cd9bff (patch)
tree300703feb6b037113fd552243a5847a92b8a4d58 /src/interfaces/ecpg/compatlib/informix.c
parent558ed5aee111823629246a986a416b55862253ba (diff)
Fix portability bugs: char values passed to <ctype.h> functions must
be cast to unsigned char. We have learned this the hard way before.
Diffstat (limited to 'src/interfaces/ecpg/compatlib/informix.c')
-rw-r--r--src/interfaces/ecpg/compatlib/informix.c6
1 files changed, 3 insertions, 3 deletions
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;
}