double_checking: complete re-write
commit4a78e8e8417ca989a11d4ff16de144934e699d1e
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 20 Jul 2023 14:28:55 +0000 (20 17:28 +0300)
committerDan Carpenter <dan.carpenter@linaro.org>
Thu, 20 Jul 2023 14:28:55 +0000 (20 17:28 +0300)
tree5a38787a10f784a935ed9ed5983edc179ff49d11
parent5d3b0391b0cda9923b1a6b8ec1c818b2794f95dd
double_checking: complete re-write

What this check does is it prints a warning when you have:

if (ret) {
if (ret) {

The re-written code is much better than before but it's still not good.

The main problem is just bugs, but the other problem is that Smatch is too
clever about say, "well *actually* if you look at x variable and y variable
it means that foo can't be non-zero so there is no need to check."  And
sometimes Smatch is wrong and sometimes Smatch is right but the code is
so complicated and an extra check is harmless so maybe we want it there.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
check_double_checking.c