Quoting Steffen Klassert :
On Thu, Oct 26, 2017 at 06:31:35AM -0500, Gustavo A. R. Silva wrote:
Use BUG_ON instead of if condition followed by BUG.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
Applied to ipsec-next, thanks Gustavo!
Glad to help
On Thu, Oct 26, 2017 at 06:31:35AM -0500, Gustavo A. R. Silva wrote:
> Use BUG_ON instead of if condition followed by BUG.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva
Applied to ipsec-next, thanks Gustavo!
Use BUG_ON instead of if condition followed by BUG.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
Changes in v2:
Update the code as suggested by Herbert Xu:
int err;
err = foo();
BUG_ON(err < 0);
net/xfrm/xfrm_user.c | 45