From: Tilman Schmidt Date: Thu, 9 Jul 2015 13:22:32 +0000 (+0200) Subject: ldattach: adapt print_table column width to widest entry X-Git-Tag: v2.27-rc1~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5225af344a8508046711f794ac2fb497db0aaa4;p=thirdparty%2Futil-linux.git ldattach: adapt print_table column width to widest entry The hardcoded column width of 10 in print_table() is not enough, as the currently longest table entry to be printed has 12 characters. Signed-off-by: Tilman Schmidt --- diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c index 33c7aa289e..5317d22d81 100644 --- a/sys-utils/ldattach.c +++ b/sys-utils/ldattach.c @@ -161,8 +161,8 @@ static void print_table(FILE * out, const struct ld_table *tab) int i; for (t = tab, i = 1; t && t->name; t++, i++) { - fprintf(out, " %-10s", t->name); - if (!(i % 6)) + fprintf(out, " %-12s", t->name); + if (!(i % 5)) fputc('\n', out); } }