]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: Use correct return for seq_show functions
authorJoe Perches <joe@perches.com>
Wed, 13 May 2015 01:28:23 +0000 (18:28 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 17 May 2015 15:25:35 +0000 (17:25 +0200)
commitf15b85d716ad4c46e648ea78c3b04cca7d2f6e2c
tree972819122fe2724529882cac48c2516a040ac894
parentf53f377bc91c36071221351a09bb96eae5480373
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>
net/netfilter/nfnetlink_queue_core.c
net/netfilter/x_tables.c