diff options
author | Karel Zak | 2018-08-23 10:13:17 +0200 |
---|---|---|
committer | Karel Zak | 2018-08-23 10:13:17 +0200 |
commit | 369be41bcd1240684d21535873910739fa74e298 (patch) | |
tree | 933e14cabec3ae2933bfaa1506b2dd3cd8f2b11d /libsmartcols/src/column.c | |
parent | libsmartcols: allow to add line to table without columns (diff) | |
download | kernel-qcow2-util-linux-369be41bcd1240684d21535873910739fa74e298.tar.gz kernel-qcow2-util-linux-369be41bcd1240684d21535873910739fa74e298.tar.xz kernel-qcow2-util-linux-369be41bcd1240684d21535873910739fa74e298.zip |
libsmartcols: don't mark as extreme where average is zero
The columns with NOEXTREME flag are internally marked as extreme
(=contains extreme width) if maximal with is greater than 2 *
average_width. This detection has to sure that the average is non-zero
otherwise the column is always "extreme".
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/column.c')
-rw-r--r-- | libsmartcols/src/column.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c index e9d6dc404..53521f6ad 100644 --- a/libsmartcols/src/column.c +++ b/libsmartcols/src/column.c @@ -167,6 +167,7 @@ int scols_column_set_flags(struct libscols_column *cl, int flags) cl->table->ntreecols--; } + DBG(COL, ul_debugobj(cl, "setting flags from 0%x to 0%x", cl->flags, flags)); cl->flags = flags; return 0; } |