]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: tools: drop upper case check after tolower()
authorWilly Tarreau <w@1wt.eu>
Sun, 26 Apr 2026 20:47:21 +0000 (22:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 27 Apr 2026 12:44:29 +0000 (14:44 +0200)
In update_word_fingerprint_with_len() we convert a character to lower
case, then it's checked against lower case, upper case and digits. Let's
just drop the upper case check which cannot happen.

src/tools.c

index 741622fa65916723b022f61bb5616a984173e6f0..f02739fd496c3d390b8ff25bc61a3e7c084f12dd 100644 (file)
@@ -6974,7 +6974,6 @@ void update_word_fingerprint_with_len(uint8_t *fp, struct ist word)
                c = tolower((unsigned char)*p);
                switch(c) {
                case 'a'...'z': to = c - 'a' + 1; break;
-               case 'A'...'Z': to = tolower((unsigned char )c) - 'a' + 1; break;
                case '0'...'9': to = 27; break;
                default:        to = 28; break;
                }