]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ppc: Change memsz variable to signed char
authorSimon Glass <sjg@chromium.org>
Thu, 5 Jan 2012 17:54:57 +0000 (17:54 +0000)
committerWolfgang Denk <wd@denx.de>
Sat, 3 Mar 2012 15:56:51 +0000 (16:56 +0100)
This seems to be unsigned char for no good reason. Tidy this up and
remove the casts.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
arch/powerpc/lib/board.c

index ff5888e4ccb3a9c86c0c145f09eb965b59727737..3f9af1deacdbba4483e08f40a7686e328aecc93f 100644 (file)
@@ -1021,7 +1021,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
         */
        {
                ulong pram = 0;
-               uchar memsz[32];
+               char memsz[32];
 
 #ifdef CONFIG_PRAM
                pram = getenv_ulong("pram", 10, CONFIG_PRAM);
@@ -1032,9 +1032,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
                pram += (LOGBUFF_LEN + LOGBUFF_OVERHEAD) / 1024;
 #endif
 #endif
-               sprintf((char *) memsz, "%ldk",
-                       (bd->bi_memsize / 1024) - pram);
-               setenv("mem", (char *) memsz);
+               sprintf(memsz, "%ldk", (bd->bi_memsize / 1024) - pram);
+               setenv("mem", memsz);
        }
 #endif