From bcae38c8ac16f8ad200253f4c8d9a17dc0013ce9 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 --- bios/e820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bios/e820.c b/bios/e820.c index 5805469..8d8b1c7 100644 --- a/bios/e820.c +++ b/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)