• Joe Perches's avatar
    netfilter: Use correct return for seq_show functions · 861fb107
    Joe Perches authored
    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: default avatarJoe Perches <joe@perches.com>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    861fb107
x_tables.c 32.1 KB