summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2003-04-16 05:25:47 +0000
committerhpa <hpa>2003-04-16 05:25:47 +0000
commitbb526a0a47411574a4f7195a4ecbed1214609b0c (patch)
tree89aa09539848bd3be00e612953809b0aa52579e9
parentc7d546c885a172f9c5a26c984ae40bebe312b556 (diff)
downloadsyslinux-bb526a0a47411574a4f7195a4ecbed1214609b0c.tar.gz
Clearness cleanup
-rw-r--r--memdisk/setup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 6a6d99fc..e33f2dd0 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -527,12 +527,12 @@ uint32_t setup(syscall_t cs_syscall, void *cs_bounce)
pptr->dpt.fd.old_fd_dpt = rdz_32(BIOS_INT1E);
}
- /* The size is given by hptr->total_size plus the size of the
- E820 map -- 12 bytes per range; we may need as many as
- 2 additional ranges plus the terminating range, over what
- nranges currently show. */
+ /* The size is given by hptr->total_size plus the size of the E820
+ map -- 12 bytes per range; we may need as many as 2 additional
+ ranges (each insertrange() can worst-case turn 1 area into 3)
+ plus the terminating range, over what nranges currently show. */
- total_size = hptr->total_size + (nranges+3)*12 + STACK_NEEDED;
+ total_size = hptr->total_size + (nranges+3)*sizeof(ranges[0]) + STACK_NEEDED;
printf("Total size needed = %u bytes\n", total_size);
if ( total_size > dos_mem ) {