summaryrefslogtreecommitdiff
path: root/libdm/libdm-report.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2017-07-19 16:16:12 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2017-07-20 11:18:29 +0200
commit0bf836aa14f98eb83969a6e81695a024f56a5eb5 (patch)
tree389b12c7074c06d4fca1403280b6275b8e930d51 /libdm/libdm-report.c
parent0d0a3397c22b9d5342584299acd814f6c8221c18 (diff)
downloadlvm2-0bf836aa14f98eb83969a6e81695a024f56a5eb5.tar.gz
tidy: prefer not using else after return
clang-tidy: avoid using 'else' after return - give more readable code, and also saves indention level.
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r--libdm/libdm-report.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index a5100d4dc..d2371db7a 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -1013,16 +1013,18 @@ static int _field_match(struct dm_report *rh, const char *field, size_t flen,
rh->report_types |= implicit ? _implicit_report_fields[f].type
: rh->fields[f].type;
return 1;
- } else
- return _add_field(rh, f, implicit, 0) ? 1 : 0;
+ }
+
+ return _add_field(rh, f, implicit, 0) ? 1 : 0;
}
if ((type = _all_match(rh, field, flen))) {
if (report_type_only) {
rh->report_types |= type;
return 1;
- } else
- return _add_all_fields(rh, type);
+ }
+
+ return _add_all_fields(rh, type);
}
return 0;