projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix incorrect use of getenv() before relocation
[oweals/u-boot.git]
/
board
/
gw8260
/
gw8260.c
diff --git
a/board/gw8260/gw8260.c
b/board/gw8260/gw8260.c
index 28f5ca99e87db3d847f404592d11621b090d651f..77a1e1d3ac1624779e169ce77984eed5f8d8f1a9 100644
(file)
--- a/
board/gw8260/gw8260.c
+++ b/
board/gw8260/gw8260.c
@@
-214,13
+214,13
@@
const iop_conf_t iop_conf_tab[4][32] = {
/*********************************************************************/
int checkboard (void)
{
/*********************************************************************/
int checkboard (void)
{
- char *str;
+ char buf[64];
+ int i = getenv_f("serial#", buf, sizeof(buf));
puts ("Board: Advent Networks gw8260\n");
puts ("Board: Advent Networks gw8260\n");
- str = getenv ("serial#");
- if (str != NULL) {
- printf ("SN: %s\n", str);
+ if (i > 0) {
+ printf("SN: %s\n", buf);
}
return 0;
}
}
return 0;
}