From 18ec0c8d1ac0d091cf9bbb7ebdefb8d5e788d4ac Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Thu, 15 Jul 2010 17:44:23 +0300 Subject: [PATCH] kvm: Use sizeof instead of magic number The 'ecx' register contains size of copied data. Use sizeof(struct e820_entry) instead of a magic number to make it obvious from the code. Signed-off-by: Pekka Enberg --- tools/kvm/bios/e820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/bios/e820.c b/tools/kvm/bios/e820.c index 580546920683..8d8b1c7a87b9 100644 --- a/tools/kvm/bios/e820.c +++ b/tools/kvm/bios/e820.c @@ -35,7 +35,7 @@ void e820_query_map(struct e820_query *query) } query->eax = SMAP; - query->ecx = 20; + query->ecx = sizeof(struct e820_entry); query->ebx = ++ndx; if (ndx >= map_size) -- 2.39.5