summaryrefslogtreecommitdiffstats
path: root/libsmartcols
diff options
context:
space:
mode:
authorIgor Gnatenko2016-12-19 23:36:48 +0100
committerIgor Gnatenko2016-12-19 23:36:48 +0100
commit16e64b6822052c84f9b00e646fefa79989a23787 (patch)
tree811dc8f262c4a5d26a5d43c3531d23fcf390e8e2 /libsmartcols
parentlsblk: use errtryhelp() (diff)
downloadkernel-qcow2-util-linux-16e64b6822052c84f9b00e646fefa79989a23787.tar.gz
kernel-qcow2-util-linux-16e64b6822052c84f9b00e646fefa79989a23787.tar.xz
kernel-qcow2-util-linux-16e64b6822052c84f9b00e646fefa79989a23787.zip
libsmartcols: remove dead checks
We initialize them before. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'libsmartcols')
-rw-r--r--libsmartcols/src/table_print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c
index c2c178f72..2aff9d181 100644
--- a/libsmartcols/src/table_print.c
+++ b/libsmartcols/src/table_print.c
@@ -275,7 +275,7 @@ static const char *get_cell_color(struct libscols_table *tb,
const char *color = NULL;
if (tb && tb->colors_wanted) {
- if (ce && !color)
+ if (ce)
color = ce->color;
if (ln && !color)
color = ln->color;
@@ -455,7 +455,7 @@ static int print_data(struct libscols_table *tb,
case SCOLS_FMT_JSON:
fputs_quoted_json_lower(scols_cell_get_data(&cl->header), tb->out);
fputs(": ", tb->out);
- if (!data || !*data)
+ if (!*data)
fputs("null", tb->out);
else
fputs_quoted_json(data, tb->out);