]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm: Use sizeof instead of magic number
authorPekka Enberg <penberg@cs.helsinki.fi>
Thu, 15 Jul 2010 14:44:23 +0000 (17:44 +0300)
committerPekka Enberg <penberg@cs.helsinki.fi>
Thu, 15 Jul 2010 14:44:23 +0000 (17:44 +0300)
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 <penberg@cs.helsinki.fi>
tools/kvm/bios/e820.c

index 580546920683b9563a39adaa073a8ffd0503465f..8d8b1c7a87b93b246a68f2325e22f51d228c1375 100644 (file)
@@ -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)