From 2abdf0143be8510c0d21ca498cba9684d052802c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Tue, 23 Feb 2016 16:28:48 +0000 Subject: [PATCH] [buffer] use explicit integer promotion to make the code more readable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Stefan Bühler git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3084 152afb58-edef-0310-8abb-c4023f1b3aa9 --- src/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index e5c1d578..9b8088ee 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -466,7 +466,7 @@ int buffer_caseless_compare(const char *a, size_t a_len, const char *b, size_t b if (cb >= 'A' && cb <= 'Z') cb |= 32; if (ca == cb) continue; - return ca - cb; + return ((int)ca) - ((int)cb); } if (a_len == b_len) return 0; return a_len < b_len ? -1 : 1;