]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: remove debuging code from sample
authorKarel Zak <kzak@redhat.com>
Tue, 6 Sep 2016 10:24:49 +0000 (12:24 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 6 Sep 2016 10:24:49 +0000 (12:24 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols/samples/wrapnl.c

index eca100f10460a40d33b23f2ebf11c72c871d7e4e..6de9e08a6fadc31daddc0e4ecd98027d2e87bfd6 100644 (file)
@@ -70,17 +70,13 @@ static struct libscols_line * add_line(     struct libscols_table *tb,
        if (!ln)
                err(EXIT_FAILURE, "failed to create output line");
 
-static int x = 0;
-
        if (scols_line_set_data(ln, COL_NAME, gen_text(prefix, "N", buf, 15, 0)))
                goto fail;
-       if (scols_line_set_data(ln, COL_DATA, gen_text(prefix, "F", buf, x % 2 ? 40 : 5, x % 2 ? 1 : 0)))
+       if (scols_line_set_data(ln, COL_DATA, gen_text(prefix, "F", buf, 40, 1)))
                goto fail;
        if (scols_line_set_data(ln, COL_LIKE, "1"))
                goto fail;
 
-x++;
-
        return ln;
 fail:
        scols_unref_table(tb);