]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: make ptr_hash() support 0-bit outputs
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Jul 2023 14:59:48 +0000 (16:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Aug 2023 17:04:34 +0000 (19:04 +0200)
commitab6cb5dea035d180bc9461b4739d90dc9c1d2aaf
treed44204b1e408870750957064f28fa7f2a4995f38
parent59c347c15e909cac33e451543ca7cd68abac670e
MINOR: tools: make ptr_hash() support 0-bit outputs

When dealing with macro-based size definitions, it is useful to be able
to hash pointers on zero bits so that the macro automatically returns a
constant 0. For now it only supports 1-32. Let's just add this special
case. It's automatically optimized out by the compiler since the function
is inlined.
include/haproxy/tools.h