From: Ezra Peisach Date: Mon, 18 Jun 2001 19:03:31 +0000 (+0000) Subject: * getdate.y: Cast argument to isalpha()/isspace()/isdigit() to int X-Git-Tag: krb5-1.3-alpha1~1394 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=563225f60d2905e3fdf7fe6d71c2f1fcc83a7e4f;p=krb5.git * getdate.y: Cast argument to isalpha()/isspace()/isdigit() to int git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13373 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index 74563c60f..088b1b34f 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,7 @@ +2001-06-18 Ezra Peisach + + * getdate.y: Cast argument to isalpha()/isspace()/isdigit() to int. + Mon Feb 26 13:25:50 2001 Ezra Peisach * ss_wrapper.c: Include kadmin.h. diff --git a/src/kadmin/cli/getdate.y b/src/kadmin/cli/getdate.y index 1b4613cb9..6480f8097 100644 --- a/src/kadmin/cli/getdate.y +++ b/src/kadmin/cli/getdate.y @@ -696,8 +696,8 @@ LookupWord(buff) /* Make it lowercase. */ for (p = buff; *p; p++) - if (isupper(*p)) - *p = tolower(*p); + if (isupper((int) *p)) + *p = tolower((int) *p); if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) { yylval.Meridian = MERam; @@ -792,27 +792,28 @@ yylex() int sign; for ( ; ; ) { - while (isspace(*yyInput)) + while (isspace((int) *yyInput)) yyInput++; - if (isdigit(c = *yyInput) || c == '-' || c == '+') { + c = *yyInput; + if (isdigit((int) c) || c == '-' || c == '+') { if (c == '-' || c == '+') { sign = c == '-' ? -1 : 1; - if (!isdigit(*++yyInput)) + if (!isdigit((int) (*++yyInput))) /* skip the '-' sign */ continue; } else sign = 0; - for (yylval.Number = 0; isdigit(c = *yyInput++); ) + for (yylval.Number = 0; isdigit((int) (c = *yyInput++)); ) yylval.Number = 10 * yylval.Number + c - '0'; yyInput--; if (sign < 0) yylval.Number = -yylval.Number; return sign ? tSNUMBER : tUNUMBER; } - if (isalpha(c)) { - for (p = buff; isalpha(c = *yyInput++) || c == '.'; ) + if (isalpha((int) c)) { + for (p = buff; isalpha((int) (c = *yyInput++)) || c == '.'; ) if (p < &buff[sizeof buff - 1]) *p++ = c; *p = '\0';