From 63874694f874aa8f791173950fa1c979baeeffa7 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 8 Apr 2018 20:01:04 +0200 Subject: [PATCH] Rewrite the code to avoid some silly warnings on some implementation. --- m-string.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/m-string.h b/m-string.h index 04a20580..eacb2b86 100644 --- a/m-string.h +++ b/m-string.h @@ -391,8 +391,10 @@ string_cmpi_str(const string_t v1, const char p2[]) int c1, c2; do { // To avoid locale without 1 per 1 mapping. - c1 = tolower((unsigned char) toupper((unsigned char) *p1++)); - c2 = tolower((unsigned char) toupper((unsigned char) *p2++)); + c1 = toupper((unsigned char) *p1++); + c2 = toupper((unsigned char) *p2++); + c1 = tolower((unsigned char) c1); + c2 = tolower((unsigned char) c2); } while (c1 == c2 && c1 != 0); return c1 - c2; }