Skip to contentSkip to conversation

master - cleanup: make report type condition consistent with the rest of the code

PATCH Peter Rajnoha 1 participant 1 message Feb 10, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2a19866a74c5101d262586ad0e08317e9a514977
Commit:        2a19866a74c5101d262586ad0e08317e9a514977
Parent:        455ef6f2f58e5af11a75eb4b369c1a48780b068d
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Tue Nov 25 14:13:04 2014 +0100
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Tue Feb 10 16:05:23 2015 +0100

cleanup: make report type condition consistent with the rest of the code

It's just more readable this way (each condition resulting in a certain report type is always on one line), just like it's used elsewhere in the code.

---
 tools/reporter.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
tools/reporter.c +2 -3
index 20fa4ab..7517ac5 100644
@@ -543,9 +543,8 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
 	if ((report_type & PVSEGS) ||
 	    ((report_type & (PVS | LABEL)) && (report_type & (LVS | LVSINFO | LVSSTATUS | LVSINFOSTATUS))))
 		report_type = PVSEGS;
-	else if ((report_type & LABEL) && (report_type & VGS))
-		report_type = PVS;
-	else if (report_type & PVS)
+	else if ((report_type & PVS) ||
+		 ((report_type & LABEL) && (report_type & VGS)))
 		report_type = PVS;
 	else if (report_type & (SEGS | SEGSSTATUS))
 		report_type = SEGS;