diff options
author | delphij <delphij@FreeBSD.org> | 2015-06-26 18:03:19 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2015-06-26 18:03:19 +0000 |
commit | 0dd72530a3754c43811c175bcfa2e35f9393ffa8 (patch) | |
tree | 8f60b2d26460560a0b63ce02a1a4663b79785aeb /sys/boot | |
parent | d4a6573433ab40fe0dceead2226ca9750881bce9 (diff) | |
download | FreeBSD-src-0dd72530a3754c43811c175bcfa2e35f9393ffa8.zip FreeBSD-src-0dd72530a3754c43811c175bcfa2e35f9393ffa8.tar.gz |
Reduce warnings:
- Add prototype for boot2 main()
- Don't make assignment within if statement, split it into two.
No functional or binary change -- verified with sha256(1).
MFC after: 2 weeks
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/i386/boot2/boot2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 75abc7e..101d2da 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -150,6 +150,7 @@ static int comspeed = SIOSPD; static uint8_t ioctrl = IO_KEYBOARD; #endif +int main(void); void exit(int); static void load(void); static int parse(void); @@ -481,7 +482,8 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - if (k = ep - arg) { + k = ep - arg; + if (k > 0) { if (k >= sizeof(knamebuf)) return -1; memcpy(knamebuf, arg, k + 1); |