mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-19 12:12:16 +00:00
guest.h: Condition operator fix of foreach_vcpu loop
The for loop statement should work in both & and &&, but it seems make more sense to have && when executing a condtion. Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
parent
5b14df3a35
commit
a69a36960a
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#define foreach_vcpu(idx, vm, vcpu) \
|
#define foreach_vcpu(idx, vm, vcpu) \
|
||||||
for (idx = 0, vcpu = vm->hw.vcpu_array[idx]; \
|
for (idx = 0, vcpu = vm->hw.vcpu_array[idx]; \
|
||||||
(idx < vm->hw.num_vcpus) & (vcpu != NULL); \
|
(idx < vm->hw.num_vcpus) && (vcpu != NULL); \
|
||||||
idx++, vcpu = vm->hw.vcpu_array[idx])
|
idx++, vcpu = vm->hw.vcpu_array[idx])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user