svn commit: r275305 - head/sys/boot/i386/boot2
Roman Divacky
rdivacky at FreeBSD.org
Sun Nov 30 08:43:56 UTC 2014
Author: rdivacky
Date: Sun Nov 30 08:43:55 2014
New Revision: 275305
URL: https://svnweb.freebsd.org/changeset/base/275305
Log:
Unbreak the code for non-digits below '0' by casting the expression
to unsigned int.
Pointed out by: bde
Modified:
head/sys/boot/i386/boot2/boot2.c
Modified: head/sys/boot/i386/boot2/boot2.c
==============================================================================
--- head/sys/boot/i386/boot2/boot2.c Sun Nov 30 08:34:46 2014 (r275304)
+++ head/sys/boot/i386/boot2/boot2.c Sun Nov 30 08:43:55 2014 (r275305)
@@ -418,7 +418,7 @@ parse()
#if SERIAL
} else if (c == 'S') {
j = 0;
- while ((i = *arg++ - '0') <= 9)
+ while ((unsigned int)(i = *arg++ - '0') <= 9)
j = j * 10 + i;
if (j > 0 && i == -'0') {
comspeed = j;
More information about the svn-src-all
mailing list