summaryrefslogtreecommitdiffstats
path: root/net/sctp/objcnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/objcnt.c')
-rw-r--r--net/sctp/objcnt.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c
index cfeb07e..f73ec0e 100644
--- a/net/sctp/objcnt.c
+++ b/net/sctp/objcnt.c
@@ -83,13 +83,12 @@ static sctp_dbg_objcnt_entry_t sctp_dbg_objcnt[] = {
*/
static int sctp_objcnt_seq_show(struct seq_file *seq, void *v)
{
- int i;
- char temp[128];
+ int i, len;
i = (int)*(loff_t *)v;
- sprintf(temp, "%s: %d", sctp_dbg_objcnt[i].label,
- atomic_read(sctp_dbg_objcnt[i].counter));
- seq_printf(seq, "%-127s\n", temp);
+ 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, "");
return 0;
}
OpenPOWER on IntegriCloud