From b8111adf3575b1c2d01b10e9b5b237ba084262c5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 9 May 2008 08:09:48 +0000 Subject: [PATCH] avoid one more ctype vs. sign-extension problem * src/util.c (TOLOWER): Also convert tolower argument. --- ChangeLog | 3 +++ src/util.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f993421cba..7e576be898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Fri May 9 10:01:34 EST 2008 Jim Meyering + avoid one more ctype vs. sign-extension problem + * src/util.c (TOLOWER): Also convert tolower argument. + add "const" and "static" attributes to file-scoped globals * src/storage_backend_fs.c (fileTypeInfo): Add "static" and two "const" attributes. diff --git a/src/util.c b/src/util.c index 8f3cef9aa9..4cef6d23c7 100644 --- a/src/util.c +++ b/src/util.c @@ -57,7 +57,8 @@ #define MAX_ERROR_LEN 1024 -#define TOLOWER(Ch) (isupper (to_uchar(Ch)) ? tolower (Ch) : (Ch)) +#define TOLOWER(Ch) (isupper (to_uchar(Ch)) \ + ? tolower (to_uchar (Ch)) : (to_uchar (Ch))) #define virLog(msg...) fprintf(stderr, msg)