diff options
author | phk <phk@FreeBSD.org> | 2002-10-08 10:15:42 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-08 10:15:42 +0000 |
commit | b8d521263b3a1c9a523304973a44b1aa1e85bebe (patch) | |
tree | e3712e8547d5a96c222ca5f11a7991c022e70734 /sys/boot | |
parent | b4ee6ee1426c78ab3ca9dbdc8bf1b4da56873daa (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/boot/i386/boot2/boot2.c | 2 | ||||
-rw-r--r-- | sys/boot/i386/gptboot/gptboot.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index d5de068..f4faae9 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.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; 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; |