From a3b96dbd55ca16a743a07df751f2bb0f7812f126 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 2 Aug 2004 22:47:44 +0000 Subject: [PATCH] (lookup_word): Rewrite to avoid cast. --- lib/getdate.y | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/getdate.y b/lib/getdate.y index 5784b6ccdc..9d948dc128 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -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) -- 2.47.3