]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ldattach: adapt print_table column width to widest entry
authorTilman Schmidt <tilman@imap.cc>
Thu, 9 Jul 2015 13:22:32 +0000 (15:22 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 15 Jul 2015 13:46:16 +0000 (15:46 +0200)
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 <tilman@imap.cc>
sys-utils/ldattach.c

index 33c7aa289e5c32f9e626aac3992cba4515ce14b9..5317d22d8176f100ebbaa17b1fc10c6c59e926ce 100644 (file)
@@ -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);
        }
 }