aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_hashlimit.c
diff options
context:
space:
mode:
authorArushi Singhal <arushisinghal19971997@gmail.com>2018-03-29 00:39:50 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-30 11:44:27 +0200
commitc47d36b3855d804b2e282f9b4eecbbd19b5453f9 (patch)
tree0e0ec89e0c66a36272a19daffb89e73772ed22c0 /net/netfilter/xt_hashlimit.c
parentnetfilter: nf_tables: use nft_set_lookup_global from nf_tables_newsetelem() (diff)
downloadlinux-dev-c47d36b3855d804b2e282f9b4eecbbd19b5453f9.tar.xz
linux-dev-c47d36b3855d804b2e282f9b4eecbbd19b5453f9.zip
netfilter: Merge assignment with return
Merge assignment with return statement to directly return the value. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_hashlimit.c')
-rw-r--r--net/netfilter/xt_hashlimit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index db2fe0911740..64fc3721d74c 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -534,8 +534,7 @@ static u64 user2rate_bytes(u32 user)
u64 r;
r = user ? U32_MAX / user : U32_MAX;
- r = (r - 1) << XT_HASHLIMIT_BYTE_SHIFT;
- return r;
+ return (r - 1) << XT_HASHLIMIT_BYTE_SHIFT;
}
static void rateinfo_recalc(struct dsthash_ent *dh, unsigned long now,