[PATCH 1/6] kvm tools: Prevent double assignment of guest memory info

Sasha Levin
2011-05-26T14:26:07Z

Use values calculated and assigned to local variables instead
of ignoring them.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
tools/kvm/kvm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c
index 7284211..1d756e0 100644
--- a/tools/kvm/kvm.c
+++ b/tools/kvm/kvm.c
@@ -192,7 +192,7 @@ void kvm__init_ram(struct kvm *kvm)
phys_size = kvm->ram_size;
host_mem = kvm->ram_start;

- kvm_register_mem_slot(kvm, 0, 0, kvm->ram_size, kvm->ram_start);
+ kvm_register_mem_slot(kvm, 0, phys_start, phys_size, host_mem);
} else {
/* First RAM range from zero to the PCI gap: */

--
1.7.5.rc3