[PATCH master] bitops: change test_bit return type from int to bool
Sascha Hauer
s.hauer at pengutronix.de
Mon Jul 1 02:34:17 PDT 2024
On Mon, 01 Jul 2024 09:35:09 +0200, Ahmad Fatoum wrote:
> test_bit currently returns some positive integer on success and don't
> enforce the return values to be either false or true.
>
> This can lead to problems if the return value is not used for
> truthiness, but in arithmetic.
>
> This seems to be the case only in KASAN code, where it's used to count
> errors. Change the return type to fix this.
>
> [...]
Applied, thanks!
[1/1] bitops: change test_bit return type from int to bool
https://git.pengutronix.de/cgit/barebox/commit/?id=4e47b8b03bce (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list