Browse Source

[buffer] use explicit integer promotion to make the code more readable

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3084 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/heads/lighttpd-1.4.x
Stefan Bühler 6 years ago
parent
commit
2abdf0143b
  1. 2
      src/buffer.c

2
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;

Loading…
Cancel
Save