X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=net%2Fsctp%2Fobjcnt.c;h=f73ec0ea93ba374f6b15810abe6789828dafa0d4;hb=3d768213a6c34a27fac1804143da8cf18b8b175f;hp=cfeb07ea1b046a814592207e1da3e6b3e387f498;hpb=3cf9460a999480f444d1b96f09b0640f52b1537e;p=~andy%2Flinux diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c index cfeb07ea1b0..f73ec0ea93b 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; }