Skip to content

Commit 3ace95c

Browse files
author
Jozsef Kadlecsik
committed
netfilter: ipset: Coding style fixes
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1 parent 10111a6 commit 3ace95c

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎include/linux/netfilter/ipset/ip_set.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ struct ip_set_type_variant {
255255
* returns negative error code,
256256
* zero for no match/success to add/delete
257257
* positive for matching element */
258-
int (*kadt)(struct ip_set *set, const struct sk_buff * skb,
258+
int (*kadt)(struct ip_set *set, const struct sk_buff *skb,
259259
const struct xt_action_param *par,
260260
enum ipset_adt adt, const struct ip_set_adt_opt *opt);
261261

@@ -430,7 +430,8 @@ static inline int nla_put_ipaddr4(struct sk_buff *skb, int type, __be32 ipaddr)
430430
return ret;
431431
}
432432

433-
static inline int nla_put_ipaddr6(struct sk_buff *skb, int type, const struct in6_addr *ipaddrptr)
433+
static inline int nla_put_ipaddr6(struct sk_buff *skb, int type,
434+
const struct in6_addr *ipaddrptr)
434435
{
435436
struct nlattr *__nested = ipset_nest_start(skb, type);
436437
int ret;

‎include/linux/netfilter/ipset/ip_set_ahash.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ type_pf_list(const struct ip_set *set,
696696
}
697697

698698
static int
699-
type_pf_kadt(struct ip_set *set, const struct sk_buff * skb,
699+
type_pf_kadt(struct ip_set *set, const struct sk_buff *skb,
700700
const struct xt_action_param *par,
701701
enum ipset_adt adt, const struct ip_set_adt_opt *opt);
702702
static int

‎net/netfilter/ipset/ip_set_bitmap_ipmac.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,11 @@ bitmap_ipmac_tlist(const struct ip_set *set,
323323
(elem->match == MAC_FILLED &&
324324
nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN,
325325
elem->ether)))
326-
goto nla_put_failure;
326+
goto nla_put_failure;
327327
timeout = elem->match == MAC_UNSET ? elem->timeout
328328
: ip_set_timeout_get(elem->timeout);
329329
if (nla_put_net32(skb, IPSET_ATTR_TIMEOUT, htonl(timeout)))
330-
goto nla_put_failure;
330+
goto nla_put_failure;
331331
ipset_nest_end(skb, nested);
332332
}
333333
ipset_nest_end(skb, atd);

‎net/netfilter/ipset/ip_set_core.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ find_set_type(const char *name, u8 family, u8 revision)
6969

7070
list_for_each_entry_rcu(type, &ip_set_type_list, list)
7171
if (STREQ(type->name, name) &&
72-
(type->family == family || type->family == NFPROTO_UNSPEC) &&
72+
(type->family == family ||
73+
type->family == NFPROTO_UNSPEC) &&
7374
revision >= type->revision_min &&
7475
revision <= type->revision_max)
7576
return type;
@@ -149,7 +150,8 @@ __find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max,
149150
rcu_read_lock();
150151
list_for_each_entry_rcu(type, &ip_set_type_list, list)
151152
if (STREQ(type->name, name) &&
152-
(type->family == family || type->family == NFPROTO_UNSPEC)) {
153+
(type->family == family ||
154+
type->family == NFPROTO_UNSPEC)) {
153155
found = true;
154156
if (type->revision_min < *min)
155157
*min = type->revision_min;
@@ -721,7 +723,8 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
721723
* by the nfnl mutex. Find the first free index in ip_set_list
722724
* and check clashing.
723725
*/
724-
if ((ret = find_free_id(set->name, &index, &clash)) != 0) {
726+
ret = find_free_id(set->name, &index, &clash);
727+
if (ret != 0) {
725728
/* If this is the same set and requested, ignore error */
726729
if (ret == -EEXIST &&
727730
(flags & IPSET_FLAG_EXIST) &&

0 commit comments

Comments
 (0)