Bring some MSVC asserts in line with other platforms
MSVC's _BitScan* functions return a boolean indicating whether any
bits were set in the input, and we were previously asserting that
they returned true, per our API. This is correct. However, other
platforms simply assert that the input is non-zero, so do that to be
more consistent.
Noted while investigating a hypothesis from Ranier Vilela about
undefined behavior, but this is not his proposed patch.
Discussion:
https://www.postgresql.org/message-id/CAEudQAoDhUZyKGJ1vbMGcgVUOcsixe-%3DjcVaDWarqkUg163D2w%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/39055cb4ccd5b521ceb802b6a8194de912a422cc
Modified Files
--------------
src/include/port/pg_bitutils.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)