> On Nov 26, 2026, at 05:02, Mikhail Gribkov <[email protected]> wrote:
>
> Hi hackers,
>
> I've noticed an odd check in test_aio.c:
> if (zero_on_error | zero_damaged_pages)
> srb_flags |= READ_BUFFERS_ZERO_ON_ERROR;
>
> Both zero_on_error and zero_damaged_pages declared as bool. Shouldn't there
> be a logical "||" inside the if-condition, not a bitwise "|"?
> Yes, it works now, but fixing it would be cleaner.
For two boolean variables “a" and “b", "a | b" and "a || b" will produce the
same result, so there is no correctness issue. But I agree fixing that improves
readability.
>
> Proposed patch is attached (although it's quite trivial).
>
> --
> best regards,
> Mikhail A. Gribkov
>
> <001_Fix_bitwise_operation_on_bools.patch>
LGTM.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/