diff options
author | Kaixu Xia <kaixuxia@tencent.com> | 2020-11-06 16:20:13 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-12-01 09:45:29 +0100 |
commit | 0ef083d51ba1f4a2e890807d49d53ad20eee0ffd (patch) | |
tree | 88d8adff40ac12dfba3488c1279c7b2182d4181f /net/netfilter | |
parent | 988187e8810364dc02f3ceb7cab497f4a2e9003f (diff) |
netfilter: Remove unnecessary conversion to bool
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>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/xt_nfacct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_nfacct.c b/net/netfilter/xt_nfacct.c index a97c2259bbc8..7c6bf1c16813 100644 --- a/net/netfilter/xt_nfacct.c +++ b/net/netfilter/xt_nfacct.c @@ -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 |