cmd_setmac/setserial: fix incompatible pointer warning + unused variable

This commit is contained in:
Alexander Couzens 2015-04-06 18:30:52 +02:00
parent ac606588bb
commit fa2f0a886c
1 changed files with 1 additions and 2 deletions

View File

@ -285,12 +285,11 @@ int do_setserial(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
int do_showserial(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
int i = 0;
u8 buffer[CFG_FLASH_SECTOR_SIZE];
int32_t *serial;
memcpy(buffer, (void *)BOARDCAL, CFG_FLASH_SECTOR_SIZE);
serial = buffer + SERIAL_LOCATION;
serial = (int32_t *) (buffer + SERIAL_LOCATION);
printf("serial %d\n", serial);
return CMD_RET_SUCCESS;