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:
@ -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++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user