]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: (sample) remove unnecessary check [coverity scan]
authorKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2020 10:20:36 +0000 (12:20 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2020 10:21:22 +0000 (12:21 +0200)
@str cannot be NULL ...

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols/samples/fromfile.c

index 64b3974dfae542f8c9e9972e9412a069d836622c..4bc03f3de196d1564e51583f2a66d22ca07865f1 100644 (file)
@@ -152,7 +152,7 @@ static int parse_column_data(FILE *f, struct libscols_table *tb, int col)
                if (!ln)
                        break;
 
-               if (str && *str && scols_line_set_data(ln, col, str) != 0)
+               if (*str && scols_line_set_data(ln, col, str) != 0)
                        err(EXIT_FAILURE, "failed to add output data");
        }