summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKaixu Xia <kaixuxia@tencent.com>2020-11-06 09:20:13 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2020-12-01 09:45:29 +0100
commit0ef083d51ba1f4a2e890807d49d53ad20eee0ffd (patch)
tree88d8adff40ac12dfba3488c1279c7b2182d4181f /net
parentipvs: replace atomic_add_return() (diff)
downloadlinux-0ef083d51ba1f4a2e890807d49d53ad20eee0ffd.tar.xz
linux-0ef083d51ba1f4a2e890807d49d53ad20eee0ffd.zip
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')
-rw-r--r--net/netfilter/xt_nfacct.c2
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