db: split zero and non-zero returns
commitd4421fd56d0bb8c867285b0368e25a562636db07
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 12 Feb 2019 14:52:08 +0000 (12 17:52 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 12 Feb 2019 14:52:08 +0000 (12 17:52 +0300)
tree567660bf6cad75824bf80b28649e201f9a542f24
parent6e67eac54aa9f963c654e5d0a3f7b1e491ba1ff2
db: split zero and non-zero returns

Before this would only split NULL vs non-NULL, but now I've made it apply
to integers as well.  I don't honestly know what I was thinking before to
make it only apply to pointers.  The "if (ret) {" check is the most common
style of error handling in the kernel.  Obviously, I would like if I could
narrow everything down to negative error codes vs zero but so far I have
not been able to do that very well.

One thing that I did was that I moved positive from negative before the
zero/non-zero check.  I'm not totally sure what should have priority and
it shouldn't matter much either way...  But I've been testing this version
so I'm going to commit it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_db.c