1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +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 row *row;
if (!(rh->flags & DM_REPORT_OUTPUT_BUFFERED) ||
dm_list_empty(&rh->rows))
return 1;
if (!rh) {
log_error("dm_report_enable_compact_output: dm report handler is NULL.");
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.
* 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 ||
report_type == LABEL ||
report_type == PVSEGS) ? 1 : 0;
/*