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>