Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sandpoint/stand/altboot mkdigit() didn't work with ...



details:   https://anonhg.NetBSD.org/src/rev/7430138331d4
branches:  trunk
changeset: 763002:7430138331d4
user:      phx <phx%NetBSD.org@localhost>
date:      Mon Mar 07 22:18:46 2011 +0000

description:
mkdigit() didn't work with values which have bit 31 set (>=0x80000000).
Do not cast to (int).

diffstat:

 sys/arch/sandpoint/stand/altboot/printf.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 385a2f843955 -r 7430138331d4 sys/arch/sandpoint/stand/altboot/printf.c
--- a/sys/arch/sandpoint/stand/altboot/printf.c Mon Mar 07 21:57:15 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/printf.c Mon Mar 07 22:18:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: printf.c,v 1.3 2011/01/23 02:08:24 nisimura Exp $ */
+/* $NetBSD: printf.c,v 1.4 2011/03/07 22:18:46 phx Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -255,7 +255,7 @@
        t = ptmp;
        *t++ = '\0';
        do {
-               int d = (int)llval % base;
+               int d = llval % base;
                *t++ = hexdigit[d];
                llval /= base;
        } while (llval != 0 && ++n < sizeof(ptmp));



Home | Main Index | Thread Index | Old Index