mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 13:04:03 +08:00
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>
This commit is contained in:
parent
a3073c17dd
commit
c47d36b385
@ -1527,9 +1527,8 @@ ctnetlink_setup_nat(struct nf_conn *ct, const struct nlattr * const cda[])
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = ctnetlink_parse_nat_setup(ct, NF_NAT_MANIP_SRC,
|
||||
return ctnetlink_parse_nat_setup(ct, NF_NAT_MANIP_SRC,
|
||||
cda[CTA_NAT_SRC]);
|
||||
return ret;
|
||||
#else
|
||||
if (!cda[CTA_NAT_DST] && !cda[CTA_NAT_SRC])
|
||||
return 0;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user