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

Commit 824f1fbe authored by Joe Perches's avatar Joe Perches Committed by Steven Rostedt
Browse files

netfilter: Convert print_tuple functions to return void

Since adding a new function to seq_file (seq_has_overflowed())
there isn't any value for functions called from seq_show to
return anything.   Remove the int returns of the various
print_tuple/<foo>_print_tuple functions.

Link: http://lkml.kernel.org/p/f2e8cf8df433a197daa62cbaf124c900c708edc7.1412031505.git.joe@perches.com



Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 37246a58
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -72,7 +72,7 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb)
	return ret;
	return ret;
}
}


int
void
print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
            const struct nf_conntrack_l3proto *l3proto,
            const struct nf_conntrack_l3proto *l3proto,
            const struct nf_conntrack_l4proto *proto);
            const struct nf_conntrack_l4proto *proto);
+2 −2
Original line number Original line Diff line number Diff line
@@ -38,7 +38,7 @@ struct nf_conntrack_l3proto {
			     const struct nf_conntrack_tuple *orig);
			     const struct nf_conntrack_tuple *orig);


	/* Print out the per-protocol part of the tuple. */
	/* Print out the per-protocol part of the tuple. */
	int (*print_tuple)(struct seq_file *s,
	void (*print_tuple)(struct seq_file *s,
			    const struct nf_conntrack_tuple *);
			    const struct nf_conntrack_tuple *);


	/*
	/*
+2 −2
Original line number Original line Diff line number Diff line
@@ -56,7 +56,7 @@ struct nf_conntrack_l4proto {
		     u_int8_t pf, unsigned int hooknum);
		     u_int8_t pf, unsigned int hooknum);


	/* Print out the per-protocol part of the tuple. Return like seq_* */
	/* Print out the per-protocol part of the tuple. Return like seq_* */
	int (*print_tuple)(struct seq_file *s,
	void (*print_tuple)(struct seq_file *s,
			    const struct nf_conntrack_tuple *);
			    const struct nf_conntrack_tuple *);


	/* Print out the private part of the conntrack. */
	/* Print out the private part of the conntrack. */
+3 −3
Original line number Original line Diff line number Diff line
@@ -56,10 +56,10 @@ static bool ipv4_invert_tuple(struct nf_conntrack_tuple *tuple,
	return true;
	return true;
}
}


static int ipv4_print_tuple(struct seq_file *s,
static void ipv4_print_tuple(struct seq_file *s,
			    const struct nf_conntrack_tuple *tuple)
			    const struct nf_conntrack_tuple *tuple)
{
{
	return seq_printf(s, "src=%pI4 dst=%pI4 ",
	seq_printf(s, "src=%pI4 dst=%pI4 ",
		   &tuple->src.u3.ip, &tuple->dst.u3.ip);
		   &tuple->src.u3.ip, &tuple->dst.u3.ip);
}
}


+8 −4
Original line number Original line Diff line number Diff line
@@ -153,8 +153,10 @@ static int ct_seq_show(struct seq_file *s, void *v)
	if (seq_has_overflowed(s))
	if (seq_has_overflowed(s))
		goto release;
		goto release;


	if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
	print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
			l3proto, l4proto))
		    l3proto, l4proto);

	if (seq_has_overflowed(s))
		goto release;
		goto release;


	if (seq_print_acct(s, ct, IP_CT_DIR_ORIGINAL))
	if (seq_print_acct(s, ct, IP_CT_DIR_ORIGINAL))
@@ -164,8 +166,10 @@ static int ct_seq_show(struct seq_file *s, void *v)
		if (seq_printf(s, "[UNREPLIED] "))
		if (seq_printf(s, "[UNREPLIED] "))
			goto release;
			goto release;


	if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_REPLY].tuple,
	print_tuple(s, &ct->tuplehash[IP_CT_DIR_REPLY].tuple,
			l3proto, l4proto))
		    l3proto, l4proto);

	if (seq_has_overflowed(s))
		goto release;
		goto release;


	if (seq_print_acct(s, ct, IP_CT_DIR_REPLY))
	if (seq_print_acct(s, ct, IP_CT_DIR_REPLY))
Loading