]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib: bits - macros to simplify expressions when using -Wstrict-bool
authorPhil Carmody <phil@dovecot.fi>
Fri, 11 May 2018 06:19:21 +0000 (09:19 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 7 Aug 2018 10:34:07 +0000 (13:34 +0300)
commit899807f467b1650b4b4bc46d2073f7cc80547b62
treecc3cd2f0da2bf0a9df9ccdd02ca9793e56d96636
parent6bda3e3fa30b1212d14fc29ecad2737b425b2de8
lib: bits - macros to simplify expressions when using -Wstrict-bool

To be strict-bool compliant, your expressions need to be a bit verbose,
these might simplify things.

There are presently over 400 instances matching HAS_NO_BITS(), and nearly
1300 instances matching HAS_ANY_BITS(), so it's a very common pattern.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
src/lib/bits.h
src/lib/test-bits.c