netfilter: Remove uses of seq_<foo> return values
The seq_printf/seq_puts/seq_putc return values, because they
are frequently misused, will eventually be converted to void.
See: commit 1f33c41c03
("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")
Miscellanea:
o realign arguments
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
e4bb9bcbfb
commit
1ca9e41770
|
@ -300,7 +300,9 @@ static int exp_seq_show(struct seq_file *s, void *v)
|
||||||
__nf_ct_l3proto_find(exp->tuple.src.l3num),
|
__nf_ct_l3proto_find(exp->tuple.src.l3num),
|
||||||
__nf_ct_l4proto_find(exp->tuple.src.l3num,
|
__nf_ct_l4proto_find(exp->tuple.src.l3num,
|
||||||
exp->tuple.dst.protonum));
|
exp->tuple.dst.protonum));
|
||||||
return seq_putc(s, '\n');
|
seq_putc(s, '\n');
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct seq_operations exp_seq_ops = {
|
static const struct seq_operations exp_seq_ops = {
|
||||||
|
|
|
@ -47,9 +47,11 @@ seq_print_acct(struct seq_file *s, const struct nf_conn *ct, int dir)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
counter = acct->counter;
|
counter = acct->counter;
|
||||||
return seq_printf(s, "packets=%llu bytes=%llu ",
|
seq_printf(s, "packets=%llu bytes=%llu ",
|
||||||
(unsigned long long)atomic64_read(&counter[dir].packets),
|
(unsigned long long)atomic64_read(&counter[dir].packets),
|
||||||
(unsigned long long)atomic64_read(&counter[dir].bytes));
|
(unsigned long long)atomic64_read(&counter[dir].bytes));
|
||||||
|
|
||||||
|
return 0;
|
||||||
};
|
};
|
||||||
EXPORT_SYMBOL_GPL(seq_print_acct);
|
EXPORT_SYMBOL_GPL(seq_print_acct);
|
||||||
|
|
||||||
|
|
|
@ -561,7 +561,9 @@ static int exp_seq_show(struct seq_file *s, void *v)
|
||||||
helper->expect_policy[expect->class].name);
|
helper->expect_policy[expect->class].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return seq_putc(s, '\n');
|
seq_putc(s, '\n');
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct seq_operations exp_seq_ops = {
|
static const struct seq_operations exp_seq_ops = {
|
||||||
|
|
|
@ -998,11 +998,13 @@ static int seq_show(struct seq_file *s, void *v)
|
||||||
{
|
{
|
||||||
const struct nfulnl_instance *inst = v;
|
const struct nfulnl_instance *inst = v;
|
||||||
|
|
||||||
return seq_printf(s, "%5d %6d %5d %1d %5d %6d %2d\n",
|
seq_printf(s, "%5d %6d %5d %1d %5d %6d %2d\n",
|
||||||
inst->group_num,
|
inst->group_num,
|
||||||
inst->peer_portid, inst->qlen,
|
inst->peer_portid, inst->qlen,
|
||||||
inst->copy_mode, inst->copy_range,
|
inst->copy_mode, inst->copy_range,
|
||||||
inst->flushtimeout, atomic_read(&inst->use));
|
inst->flushtimeout, atomic_read(&inst->use));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct seq_operations nful_seq_ops = {
|
static const struct seq_operations nful_seq_ops = {
|
||||||
|
|
Loading…
Reference in New Issue