diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2013-11-14 17:31:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 19:32:20 -0500 |
commit | 652586df95e5d76b37d07a11839126dcfede1621 (patch) | |
tree | e3a668265cade256302830ea3ff8b3699ab2977e /net/sctp/objcnt.c | |
parent | 839cc2a94cc3665bafe32203c2f095f4dd470a80 (diff) |
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 'net/sctp/objcnt.c')
-rw-r--r-- | net/sctp/objcnt.c | 9 |
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[] = { | |||
79 | */ | 79 | */ |
80 | static int sctp_objcnt_seq_show(struct seq_file *seq, void *v) | 80 | static int sctp_objcnt_seq_show(struct seq_file *seq, void *v) |
81 | { | 81 | { |
82 | int i, len; | 82 | int i; |
83 | 83 | ||
84 | i = (int)*(loff_t *)v; | 84 | i = (int)*(loff_t *)v; |
85 | seq_printf(seq, "%s: %d%n", sctp_dbg_objcnt[i].label, | 85 | seq_setwidth(seq, 127); |
86 | atomic_read(sctp_dbg_objcnt[i].counter), &len); | 86 | seq_printf(seq, "%s: %d", sctp_dbg_objcnt[i].label, |
87 | seq_printf(seq, "%*s\n", 127 - len, ""); | 87 | atomic_read(sctp_dbg_objcnt[i].counter)); |
88 | seq_pad(seq, '\n'); | ||
88 | return 0; | 89 | return 0; |
89 | } | 90 | } |
90 | 91 | ||