Skip to content

Commit

Permalink
netfilter: Remove unnecessary conversion to bool
Browse files Browse the repository at this point in the history
Here we could use the '!=' expression to fix the following coccicheck
warning:

./net/netfilter/xt_nfacct.c:30:41-46: WARNING: conversion to bool not needed here

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Kaixu Xia authored and Pablo Neira Ayuso committed Dec 1, 2020
1 parent 988187e commit 0ef083d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/xt_nfacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static bool nfacct_mt(const struct sk_buff *skb, struct xt_action_param *par)

overquota = nfnl_acct_overquota(xt_net(par), info->nfacct);

return overquota == NFACCT_UNDERQUOTA ? false : true;
return overquota != NFACCT_UNDERQUOTA;
}

static int
Expand Down

0 comments on commit 0ef083d

Please sign in to comment.