virsh: domain: remove else branch

I removed else branches after return/break as they are not
necessary and the code looks cleaner without them.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Kristina Hanicova 2021-09-24 17:17:50 +02:00 committed by Michal Privoznik
parent bd82e3d81a
commit 49d74124a5

View File

@ -11040,12 +11040,12 @@ cmdMigrateCompCache(vshControl *ctl, const vshCmd *cmd)
return false;
rc = vshCommandOptULongLong(ctl, cmd, "size", &size);
if (rc < 0) {
if (rc < 0)
return false;
if (rc != 0 &&
(virDomainMigrateSetCompressionCache(dom, size, 0) < 0))
return false;
} else if (rc != 0) {
if (virDomainMigrateSetCompressionCache(dom, size, 0) < 0)
return false;
}
if (virDomainMigrateGetCompressionCache(dom, &size, 0) < 0)
return false;
@ -11426,11 +11426,9 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
/* We got what we came for so return successfully */
ret = true;
if (!all) {
if (!all)
break;
} else {
vshPrint(ctl, "\n");
}
vshPrint(ctl, "\n");
}
if (!ret) {