]> git.karo-electronics.de Git - linux-beck.git/commitdiff
netfilter: Remove uses of seq_<foo> return values
authorJoe Perches <joe@perches.com>
Mon, 16 Mar 2015 18:25:17 +0000 (11:25 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 18 Mar 2015 09:51:35 +0000 (10:51 +0100)
The seq_printf/seq_puts/seq_putc return values, because they
are frequently misused, will eventually be converted to void.

See: commit 1f33c41c03da ("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>
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
net/netfilter/nf_conntrack_acct.c
net/netfilter/nf_conntrack_expect.c
net/netfilter/nfnetlink_log.c

index a460a87e14f890437a65a2434f6c6ea9fcb56c9d..f0dfe92a00d66a6a58301a94b238baa5cae32fb7 100644 (file)
@@ -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_l4proto_find(exp->tuple.src.l3num,
                                         exp->tuple.dst.protonum));
-       return seq_putc(s, '\n');
+       seq_putc(s, '\n');
+
+       return 0;
 }
 
 static const struct seq_operations exp_seq_ops = {
index a4b5e2a435acb4c2fafaf26ccb4fce349a151f9a..45da11afa785b2779857b3786881158c821263b3 100644 (file)
@@ -47,9 +47,11 @@ seq_print_acct(struct seq_file *s, const struct nf_conn *ct, int dir)
                return 0;
 
        counter = acct->counter;
-       return seq_printf(s, "packets=%llu bytes=%llu ",
-                         (unsigned long long)atomic64_read(&counter[dir].packets),
-                         (unsigned long long)atomic64_read(&counter[dir].bytes));
+       seq_printf(s, "packets=%llu bytes=%llu ",
+                  (unsigned long long)atomic64_read(&counter[dir].packets),
+                  (unsigned long long)atomic64_read(&counter[dir].bytes));
+
+       return 0;
 };
 EXPORT_SYMBOL_GPL(seq_print_acct);
 
index 91a1837acd0e8fb981ccea73ae262197afecfb33..7a17070c5dabb979c2cb90b7b62f35a79cdc92c0 100644 (file)
@@ -561,7 +561,9 @@ static int exp_seq_show(struct seq_file *s, void *v)
                                   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 = {
index 11d85b3813f26ae87f465d7f4d09ae36a6d0167e..db5e3a80fc6d0797a9f34c0acefe018f0751a761 100644 (file)
@@ -998,11 +998,13 @@ static int seq_show(struct seq_file *s, void *v)
 {
        const struct nfulnl_instance *inst = v;
 
-       return seq_printf(s, "%5d %6d %5d %1d %5d %6d %2d\n",
-                         inst->group_num,
-                         inst->peer_portid, inst->qlen,
-                         inst->copy_mode, inst->copy_range,
-                         inst->flushtimeout, atomic_read(&inst->use));
+       seq_printf(s, "%5d %6d %5d %1d %5d %6d %2d\n",
+                  inst->group_num,
+                  inst->peer_portid, inst->qlen,
+                  inst->copy_mode, inst->copy_range,
+                  inst->flushtimeout, atomic_read(&inst->use));
+
+       return 0;
 }
 
 static const struct seq_operations nful_seq_ops = {