From 6e52f863eef5dbdcc93feee4f8f2b41a01443a95 Mon Sep 17 00:00:00 2001 From: Roman Divacky <rdivacky@FreeBSD.org> Date: Sun, 30 Nov 2014 08:43:55 +0000 Subject: [PATCH] Unbreak the code for non-digits below '0' by casting the expression to unsigned int. Pointed out by: bde --- sys/boot/i386/boot2/boot2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 001126fb83f8..75abc7e895e7 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -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;