mirror of https://gitee.com/openkylin/libvirt.git
virsh: virshVcpuinfoPrintAffinity: Use if-else instead of ternary operator
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
3a00632667
commit
34244cc20d
|
@ -6721,8 +6721,12 @@ virshVcpuinfoPrintAffinity(vshControl *ctl,
|
|||
return -1;
|
||||
vshPrint(ctl, _("%s (out of %d)"), str, maxcpu);
|
||||
} else {
|
||||
for (i = 0; i < maxcpu; i++)
|
||||
vshPrint(ctl, "%c", VIR_CPU_USED(cpumap, i) ? 'y' : '-');
|
||||
for (i = 0; i < maxcpu; i++) {
|
||||
if (VIR_CPU_USED(cpumap, i))
|
||||
vshPrint(ctl, "y");
|
||||
else
|
||||
vshPrint(ctl, "-");
|
||||
}
|
||||
}
|
||||
vshPrint(ctl, "\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue