1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 18:56:39 +02:00

(lookup_word): Rewrite to avoid cast.

This commit is contained in:
Paul Eggert
2004-08-02 22:47:44 +00:00
parent e9d449928d
commit a3b96dbd55

View File

@@ -768,8 +768,11 @@ lookup_word (parser_control const *pc, char *word)
/* Make it uppercase. */
for (p = word; *p; p++)
if (ISLOWER ((unsigned char) *p))
*p = toupper ((unsigned char) *p);
{
unsigned char ch = *p;
if (ISLOWER (ch))
*p = toupper (ch);
}
for (tp = meridian_table; tp->name; tp++)
if (strcmp (word, tp->name) == 0)