svn commit: r284878 - head/sys/boot/i386/boot2
Xin LI
delphij at FreeBSD.org
Fri Jun 26 18:03:20 UTC 2015
Author: delphij
Date: Fri Jun 26 18:03:19 2015
New Revision: 284878
URL: https://svnweb.freebsd.org/changeset/base/284878
Log:
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
Modified:
head/sys/boot/i386/boot2/boot2.c
Modified: head/sys/boot/i386/boot2/boot2.c
==============================================================================
--- head/sys/boot/i386/boot2/boot2.c Fri Jun 26 18:00:29 2015 (r284877)
+++ head/sys/boot/i386/boot2/boot2.c Fri Jun 26 18:03:19 2015 (r284878)
@@ -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);
More information about the svn-src-all
mailing list