Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ace95c0 authored by Jozsef Kadlecsik's avatar Jozsef Kadlecsik
Browse files

netfilter: ipset: Coding style fixes

parent 10111a6e
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -430,7 +430,8 @@ static inline int nla_put_ipaddr4(struct sk_buff *skb, int type, __be32 ipaddr)
	return ret;
	return ret;
}
}


static inline int nla_put_ipaddr6(struct sk_buff *skb, int type, const struct in6_addr *ipaddrptr)
static inline int nla_put_ipaddr6(struct sk_buff *skb, int type,
				  const struct in6_addr *ipaddrptr)
{
{
	struct nlattr *__nested = ipset_nest_start(skb, type);
	struct nlattr *__nested = ipset_nest_start(skb, type);
	int ret;
	int ret;
+6 −3
Original line number Original line Diff line number Diff line
@@ -69,7 +69,8 @@ find_set_type(const char *name, u8 family, u8 revision)


	list_for_each_entry_rcu(type, &ip_set_type_list, list)
	list_for_each_entry_rcu(type, &ip_set_type_list, list)
		if (STREQ(type->name, name) &&
		if (STREQ(type->name, name) &&
		    (type->family == family || type->family == NFPROTO_UNSPEC) &&
		    (type->family == family ||
		     type->family == NFPROTO_UNSPEC) &&
		    revision >= type->revision_min &&
		    revision >= type->revision_min &&
		    revision <= type->revision_max)
		    revision <= type->revision_max)
			return type;
			return type;
@@ -149,7 +150,8 @@ __find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max,
	rcu_read_lock();
	rcu_read_lock();
	list_for_each_entry_rcu(type, &ip_set_type_list, list)
	list_for_each_entry_rcu(type, &ip_set_type_list, list)
		if (STREQ(type->name, name) &&
		if (STREQ(type->name, name) &&
		    (type->family == family || type->family == NFPROTO_UNSPEC)) {
		    (type->family == family ||
		     type->family == NFPROTO_UNSPEC)) {
			found = true;
			found = true;
			if (type->revision_min < *min)
			if (type->revision_min < *min)
				*min = type->revision_min;
				*min = type->revision_min;
@@ -721,7 +723,8 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
	 * by the nfnl mutex. Find the first free index in ip_set_list
	 * by the nfnl mutex. Find the first free index in ip_set_list
	 * and check clashing.
	 * and check clashing.
	 */
	 */
	if ((ret = find_free_id(set->name, &index, &clash)) != 0) {
	ret = find_free_id(set->name, &index, &clash);
	if (ret != 0) {
		/* If this is the same set and requested, ignore error */
		/* If this is the same set and requested, ignore error */
		if (ret == -EEXIST &&
		if (ret == -EEXIST &&
		    (flags & IPSET_FLAG_EXIST) &&
		    (flags & IPSET_FLAG_EXIST) &&
+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.