summaryrefslogtreecommitdiffstats
path: root/net/sctp/objcnt.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2013-11-14 23:31:57 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 01:32:20 +0100
commit652586df95e5d76b37d07a11839126dcfede1621 (patch)
treee3a668265cade256302830ea3ff8b3699ab2977e /net/sctp/objcnt.c
parentseq_file: introduce seq_setwidth() and seq_pad() (diff)
downloadlinux-652586df95e5d76b37d07a11839126dcfede1621.tar.xz
linux-652586df95e5d76b37d07a11839126dcfede1621.zip
seq_file: remove "%n" usage from seq_file users
All seq_printf() users are using "%n" for calculating padding size, convert them to use seq_setwidth() / seq_pad() pair. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Joe Perches <joe@perches.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--net/sctp/objcnt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c
index 5ea573b37648..647396baa56f 100644
--- a/net/sctp/objcnt.c
+++ b/net/sctp/objcnt.c
@@ -79,12 +79,13 @@ static sctp_dbg_objcnt_entry_t sctp_dbg_objcnt[] = {
*/
static int sctp_objcnt_seq_show(struct seq_file *seq, void *v)
{
- int i, len;
+ int i;
i = (int)*(loff_t *)v;
- seq_printf(seq, "%s: %d%n", sctp_dbg_objcnt[i].label,
- atomic_read(sctp_dbg_objcnt[i].counter), &len);
- seq_printf(seq, "%*s\n", 127 - len, "");
+ seq_setwidth(seq, 127);
+ seq_printf(seq, "%s: %d", sctp_dbg_objcnt[i].label,
+ atomic_read(sctp_dbg_objcnt[i].counter));
+ seq_pad(seq, '\n');
return 0;
}