mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
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:
parent
9890eb0056
commit
4f8ae0353f
@ -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;
|
||||
orig_flags |= VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS;
|
||||
orig_flags |= VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION;
|
||||
|
||||
for (i = 0; i < snaplist->nsnaps; i++) {
|
||||
switch (virshSnapshotFilter(ctl, snaplist->snaps[i].snap,
|
||||
orig_flags)) {
|
||||
|
Loading…
Reference in New Issue
Block a user