fix signed calls to isalpha/isdigit/isspace etc.

This commit is contained in:
Christian Grothoff 2017-10-06 19:53:48 +02:00
parent 85a2d3dc0e
commit e5aed9e5cb
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ TALER_string_to_amount (const char *str,
0, 0,
sizeof (struct TALER_Amount)); sizeof (struct TALER_Amount));
/* skip leading whitespace */ /* skip leading whitespace */
while (isspace(str[0])) while (isspace( (unsigned char) str[0]))
str++; str++;
if ('\0' == str[0]) if ('\0' == str[0])
{ {

View File

@ -309,7 +309,7 @@ validate_iban (const char *iban)
nbuf = GNUNET_malloc ((len * 2) + 1); nbuf = GNUNET_malloc ((len * 2) + 1);
for (i=0, j=0; i < len; i++) for (i=0, j=0; i < len; i++)
{ {
if (isalpha ((int) ibancpy[i])) if (isalpha ((unsigned char) ibancpy[i]))
{ {
if (2 != snprintf(&nbuf[j], if (2 != snprintf(&nbuf[j],
3, 3,
@ -326,7 +326,7 @@ validate_iban (const char *iban)
j++; j++;
} }
for (j=0;'\0' != nbuf[j];j++) for (j=0;'\0' != nbuf[j];j++)
GNUNET_assert (isdigit(nbuf[j])); GNUNET_assert (isdigit( (unsigned char) nbuf[j]));
GNUNET_assert (sizeof(dividend) >= 8); GNUNET_assert (sizeof(dividend) >= 8);
remainder = 0; remainder = 0;
for (i=0; i<j; i+=16) for (i=0; i<j; i+=16)