From: Domen Puncer No need for an array here. Therefore no need to worry about possible overflows. seq_printf() can handle this. Signed-off-by: walter harms Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton --- 25-akpm/fs/proc/proc_tty.c | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) diff -puN fs/proc/proc_tty.c~linux-269-fs-proc-proc_ttyc-avoid-array fs/proc/proc_tty.c --- 25/fs/proc/proc_tty.c~linux-269-fs-proc-proc_ttyc-avoid-array 2004-12-27 00:53:47.226759112 -0800 +++ 25-akpm/fs/proc/proc_tty.c 2004-12-27 00:53:47.229758656 -0800 @@ -32,10 +32,8 @@ static void show_tty_range(struct seq_fi seq_printf(m, "%-20s ", p->driver_name ? p->driver_name : "unknown"); seq_printf(m, "/dev/%-8s ", p->name); if (p->num > 1) { - char range[20]; - sprintf(range, "%d-%d", MINOR(from), + seq_printf(m, "%3d %d-%d ", MAJOR(from), MINOR(from), MINOR(from) + num - 1); - seq_printf(m, "%3d %7s ", MAJOR(from), range); } else { seq_printf(m, "%3d %7d ", MAJOR(from), MINOR(from)); } _