diff options
author | Joe Perches | 2015-05-13 03:28:23 +0200 |
---|---|---|
committer | Pablo Neira Ayuso | 2015-05-17 17:25:35 +0200 |
commit | 861fb1078fd4ea09b442987b3e20fced0f15eb92 (patch) | |
tree | 972819122fe2724529882cac48c2516a040ac894 /net/netfilter/nfnetlink_queue_core.c | |
parent | netfilter: x_tables: add context to know if extension runs from nft_compat (diff) | |
download | kernel-qcow2-linux-861fb1078fd4ea09b442987b3e20fced0f15eb92.tar.gz kernel-qcow2-linux-861fb1078fd4ea09b442987b3e20fced0f15eb92.tar.xz kernel-qcow2-linux-861fb1078fd4ea09b442987b3e20fced0f15eb92.zip |
netfilter: Use correct return for seq_show functions
Using seq_has_overflowed doesn't produce the right return value.
Either 0 or -1 is, but 0 is much more common and works well when
seq allocation retries.
I believe this doesn't matter as the initial allocation is always
sufficient, this is just a correctness patch.
Miscellanea:
o Don't use strlen, use *ptr to determine if a string
should be emitted like all the other tests here
o Delete unnecessary return statements
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nfnetlink_queue_core.c')
-rw-r--r-- | net/netfilter/nfnetlink_queue_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c index 0b98c7420239..bec7c60fe4d0 100644 --- a/net/netfilter/nfnetlink_queue_core.c +++ b/net/netfilter/nfnetlink_queue_core.c @@ -1257,7 +1257,7 @@ static int seq_show(struct seq_file *s, void *v) inst->copy_mode, inst->copy_range, inst->queue_dropped, inst->queue_user_dropped, inst->id_sequence, 1); - return seq_has_overflowed(s); + return 0; } static const struct seq_operations nfqnl_seq_ops = { |