]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(lookup_word): Rewrite to avoid cast.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2004 22:47:44 +0000 (22:47 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2004 22:47:44 +0000 (22:47 +0000)
lib/getdate.y

index 5784b6ccdc9bad4e44fd9478633bd09838512699..9d948dc1285844196e89017d00f043ba4a28d286 100644 (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)