Re: [PATCH 18/25] staging: lustre: libcfs: clear up failure patch in cfs_cpt_*_print
From: Dan Carpenter
Date: Tue Apr 17 2018 - 03:39:49 EST
> - if (rc < 0)
> - return rc;
> return tmp - buf;
> + return -E2BIG;
We finally fixed this bug! Hooray! But it's like you guys are
deliberately writing in terrible style. You can just return directly
and then you would have avoided this bug altogether from square one!
People think that by adding little twists and moving code to the end
of the function the it will be less buggy. It's not true. It's like at
a hospital if they just swept the cockroaches under the bed, just
because it's at the end of the function where you can't see it or review
it doesn't mean it's not buggy.