1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Make sure that all <ctype.h> routines are called with unsigned char

values; it's not portable to call them with signed chars.  I recall doing
this for the last release, but a few more uncasted calls have snuck in.
This commit is contained in:
Tom Lane
2001-12-30 23:09:42 +00:00
parent e7d9a6bf63
commit ee051baeac
7 changed files with 23 additions and 22 deletions

View File

@ -78,7 +78,7 @@ isinteger(char *buff)
i++;
continue;
}
if (!isdigit((int) *i))
if (!isdigit((unsigned char) *i))
return 0;
i++;
}
@ -90,7 +90,7 @@ strtoupper(char *string)
{
while (*string != '\0')
{
*string = toupper(*string);
*string = toupper((unsigned char) *string);
string++;
}
}
@ -100,7 +100,7 @@ strtolower(char *string)
{
while (*string != '\0')
{
*string = tolower(*string);
*string = tolower((unsigned char) *string);
string++;
}
}