[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.
From: |
David Miller |
Subject: |
Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit. |
Date: |
Sun, 12 Apr 2009 01:05:40 -0700 (PDT) |
From: Pavel Roskin <address@hidden>
Date: Sun, 12 Apr 2009 02:39:22 -0400
> On Sat, 2009-04-11 at 01:08 -0700, David Miller wrote:
>> The grub printf code tries to treat 'long' and 'int' the same,
>> that doesn't work on (most) 64-bit platforms.
>
>> + n = (unsigned) (-((long) n));
>
> "unsigned" means "unsigned int". You need "unsigned long" here.
Thanks, I'll fix this as follows.
* kern/misc.c (grub_ltoa): Fix cast when handling negative
values. Noticed by Pavel Roskin.
--- kern/misc.c (revision 2086)
+++ kern/misc.c (working copy)
@@ -598,7 +598,7 @@
if ((long) n < 0 && c == 'd')
{
- n = (unsigned) (-((long) n));
+ n = (unsigned long) (-((long) n));
*str++ = '-';
}
- Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit., (continued)
- Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit., Pavel Roskin, 2009/04/12
- Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit., Pavel Roskin, 2009/04/12
- Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit., phcoder, 2009/04/12
- Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit., Pavel Roskin, 2009/04/13
- Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit., phcoder, 2009/04/15
Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit., Pavel Roskin, 2009/04/12
- Re: [PATCH]: grub: Fix handling of long printf arguments on 64-bit.,
David Miller <=