diff options
author | Wolfgang Denk <wd@denx.de> | 2007-08-02 00:48:45 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-08-02 00:48:45 +0200 |
commit | cdd917a43da6fa7fc8f54a3cc9f420ce5ecf3197 (patch) | |
tree | d171af231adccfc25a395c6b656733f2f549774d /board/mpc8641hpcn/sys_eeprom.c | |
parent | 5dc210dec5bace98a50b6ba905347890091a9bb0 (diff) | |
download | u-boot-imx-cdd917a43da6fa7fc8f54a3cc9f420ce5ecf3197.zip u-boot-imx-cdd917a43da6fa7fc8f54a3cc9f420ce5ecf3197.tar.gz u-boot-imx-cdd917a43da6fa7fc8f54a3cc9f420ce5ecf3197.tar.bz2 |
Fix build errors and warnings / code cleanup.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/mpc8641hpcn/sys_eeprom.c')
-rw-r--r-- | board/mpc8641hpcn/sys_eeprom.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/board/mpc8641hpcn/sys_eeprom.c b/board/mpc8641hpcn/sys_eeprom.c index 74e2a3d..7bc663b 100644 --- a/board/mpc8641hpcn/sys_eeprom.c +++ b/board/mpc8641hpcn/sys_eeprom.c @@ -68,7 +68,7 @@ int mac_show(void) mac_data.date[5], mac_data.date[6]); for (i = 0; i < 8; i++) { - sprintf(ethaddr[i], + sprintf((char *)ethaddr[i], "%02x:%02x:%02x:%02x:%02x:%02x", mac_data.mac[i][0], mac_data.mac[i][1], @@ -79,10 +79,10 @@ int mac_show(void) printf("MAC %d %s\n", i, ethaddr[i]); } - setenv("ethaddr", ethaddr[0]); - setenv("eth1addr", ethaddr[1]); - setenv("eth2addr", ethaddr[2]); - setenv("eth3addr", ethaddr[3]); + setenv("ethaddr", (char *)ethaddr[0]); + setenv("eth1addr", (char *)ethaddr[1]); + setenv("eth2addr", (char *)ethaddr[2]); + setenv("eth3addr", (char *)ethaddr[3]); return 0; } @@ -236,7 +236,7 @@ int mac_read_from_eeprom(void) } else { for (i = 0; i < 4; i++) { if (memcmp(&mac_data.mac[i], "\0\0\0\0\0\0", 6)) { - sprintf(ethaddr[i], + sprintf((char *)ethaddr[i], "%02x:%02x:%02x:%02x:%02x:%02x", mac_data.mac[i][0], mac_data.mac[i][1], @@ -244,10 +244,10 @@ int mac_read_from_eeprom(void) mac_data.mac[i][3], mac_data.mac[i][4], mac_data.mac[i][5]); - sprintf(enetvar, + sprintf((char *)enetvar, i ? "eth%daddr" : "ethaddr", i); - setenv(enetvar, ethaddr[i]); + setenv((char *)enetvar, (char *)ethaddr[i]); } } } |