tools: snapshot: remove pointless checks

There's no need to check whether a flag is not set just to set it
in that case.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Ján Tomko 2022-04-01 15:11:01 +02:00
parent 9890eb0056
commit 4f8ae0353f

View File

@ -1292,10 +1292,9 @@ virshSnapshotListCollect(vshControl *ctl, virDomainPtr dom,
if (filter_fallback) {
/* Older API didn't filter on status or location, but the
* information is available in domain XML. */
if (!(orig_flags & VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS))
orig_flags |= VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS;
if (!(orig_flags & VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION))
orig_flags |= VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION;
for (i = 0; i < snaplist->nsnaps; i++) {
switch (virshSnapshotFilter(ctl, snaplist->snaps[i].snap,
orig_flags)) {