[2087] * kern/misc.c (grub_ltoa): Fix cast when handling negative

"David S. Miller" <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2087
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2087
Author:   davem
Date:     2009-04-12 08:06:26 +0000 (Sun, 12 Apr 2009)
Log Message:
-----------
	* kern/misc.c (grub_ltoa): Fix cast when handling negative
	values.  Noticed by Pavel Roskin.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/kern/misc.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-04-12 04:33:18 UTC (rev 2086)
+++ trunk/grub2/ChangeLog	2009-04-12 08:06:26 UTC (rev 2087)
@@ -1,3 +1,8 @@
+2009-04-12  David S. Miller  <[email protected]>
+
+	* kern/misc.c (grub_ltoa): Fix cast when handling negative
+	values.  Noticed by Pavel Roskin.
+
 2009-04-12  Pavel Roskin  <[email protected]>
 
          * configure.ac: Change the logic when we check for target tools.

Modified: trunk/grub2/kern/misc.c
===================================================================
--- trunk/grub2/kern/misc.c	2009-04-12 04:33:18 UTC (rev 2086)
+++ trunk/grub2/kern/misc.c	2009-04-12 08:06:26 UTC (rev 2087)
@@ -598,7 +598,7 @@
 
   if ((long) n < 0 && c == 'd')
     {
-      n = (unsigned) (-((long) n));
+      n = (unsigned long) (-((long) n));
       *str++ = '-';
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.