summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/gptboot/gptboot.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-10-08 10:15:42 +0000
committerphk <phk@FreeBSD.org>2002-10-08 10:15:42 +0000
commitb8d521263b3a1c9a523304973a44b1aa1e85bebe (patch)
treee3712e8547d5a96c222ca5f11a7991c022e70734 /sys/boot/i386/gptboot/gptboot.c
parentb4ee6ee1426c78ab3ca9dbdc8bf1b4da56873daa (diff)
downloadFreeBSD-src-b8d521263b3a1c9a523304973a44b1aa1e85bebe.zip
FreeBSD-src-b8d521263b3a1c9a523304973a44b1aa1e85bebe.tar.gz
Correctly calculate dmadat: We need to take the address of _end, it's
contents is irrelevant and likely to be zero; This doesn't change the resultant value, but it does save a couple of bytes because &_end is constant.
Diffstat (limited to 'sys/boot/i386/gptboot/gptboot.c')
-rw-r--r--sys/boot/i386/gptboot/gptboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index d5de068..f4faae9 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -224,7 +224,7 @@ main(void)
int autoboot, i;
ino_t ino;
- dmadat = (void *)(roundup2(__base + _end, 0x10000) - __base);
+ dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base);
v86.ctl = V86_FLAGS;
dsk.drive = *(uint8_t *)PTOV(ARGS);
dsk.type = dsk.drive & DRV_HARD ? TYPE_AD : TYPE_FD;
OpenPOWER on IntegriCloud