Also reformat code a bit to make nesting a bit clearer.
Reported by Clang.
* kvm.c (vcpu_register): Do not assign vcpu_alloc result to vcpu_info
as this value is not used afterwards in the function.
struct vcpu_info *vcpu_info = vcpu_find(tcp, fd);
- if (!vcpu_info)
- vcpu_info = vcpu_alloc(tcp, fd, cpuid);
- else if (vcpu_info->cpuid != cpuid)
- {
+ if (!vcpu_info) {
+ vcpu_alloc(tcp, fd, cpuid);
+ } else if (vcpu_info->cpuid != cpuid) {
vcpu_info->cpuid = cpuid;
vcpu_info->resolved = false;
}