diff options
author | Karel Zak | 2017-01-09 13:07:37 +0100 |
---|---|---|
committer | Karel Zak | 2017-01-09 13:07:37 +0100 |
commit | efc07958110c6c2cac15e5c4c9c80cc1361924cf (patch) | |
tree | 529f81b9189e5e8ec9291eb180034bffbc442410 /libsmartcols | |
parent | lscpu: add aarch64 specific names (diff) | |
parent | libsmartcols: remove dead checks (diff) | |
download | kernel-qcow2-util-linux-efc07958110c6c2cac15e5c4c9c80cc1361924cf.tar.gz kernel-qcow2-util-linux-efc07958110c6c2cac15e5c4c9c80cc1361924cf.tar.xz kernel-qcow2-util-linux-efc07958110c6c2cac15e5c4c9c80cc1361924cf.zip |
Merge branch 'ignatenko/libsmartcols-dead' of https://github.com/ignatenkobrain/util-linux
* 'ignatenko/libsmartcols-dead' of https://github.com/ignatenkobrain/util-linux:
libsmartcols: remove dead checks
Diffstat (limited to 'libsmartcols')
-rw-r--r-- | libsmartcols/src/table_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c index 720cfe2bf..65f261245 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); |