From 4cfef8acabbf5d7bd6e1481f3387fa0d4271ab00 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 24 Dec 2017 12:49:28 +0100 Subject: [PATCH] Apply part from patch 9525: fix lwip_strnicmp in a modified way: Move side effect out of boolean expression --- src/core/def.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/def.c b/src/core/def.c index e37501ae..514e701e 100644 --- a/src/core/def.c +++ b/src/core/def.c @@ -183,7 +183,8 @@ lwip_strnicmp(const char *str1, const char *str2, size_t len) return 1; } } - } while (len-- && c1 != 0); + len--; + } while ((len != 0) && (c1 != 0)); return 0; } #endif