1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm-report: Fix order of NULL dm_report check.

This commit is contained in:
Alasdair G Kergon 2015-01-17 10:50:54 +00:00
parent 302b6c99a7
commit 651549594e
2 changed files with 4 additions and 5 deletions

View File

@ -1705,15 +1705,15 @@ int dm_report_compact_fields(struct dm_report *rh)
struct field_properties *fp; struct field_properties *fp;
struct row *row; struct row *row;
if (!(rh->flags & DM_REPORT_OUTPUT_BUFFERED) ||
dm_list_empty(&rh->rows))
return 1;
if (!rh) { if (!rh) {
log_error("dm_report_enable_compact_output: dm report handler is NULL."); log_error("dm_report_enable_compact_output: dm report handler is NULL.");
return 0; return 0;
} }
if (!(rh->flags & DM_REPORT_OUTPUT_BUFFERED) ||
dm_list_empty(&rh->rows))
return 1;
/* /*
* At first, mark all fields with FLD_HIDDEN flag. * At first, mark all fields with FLD_HIDDEN flag.
* Also, mark field with FLD_COMPACTED flag, but only * Also, mark field with FLD_COMPACTED flag, but only

View File

@ -418,7 +418,6 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
args_are_pvs = (report_type == PVS || args_are_pvs = (report_type == PVS ||
report_type == LABEL || report_type == LABEL ||
report_type == PVSEGS) ? 1 : 0; report_type == PVSEGS) ? 1 : 0;
/* /*