Fix incorrect use of getenv() before relocation
[oweals/u-boot.git] / board / actux1 / actux1.c
index e73aff8ced7d7b0a1cf9dc148ebb7157236ae1d5..85e3f9e6c4df69bc390ba4c9238fa9d7889b84f2 100644 (file)
@@ -89,14 +89,15 @@ int board_init (void)
  */
 int checkboard (void)
 {
-       char *s = getenv ("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        puts ("Board: AcTux-1 rev.");
        putc (ACTUX1_BOARDREL + 'A' - 1);
 
-       if (s != NULL) {
-               puts (", serial# ");
-               puts (s);
+       if (i > 0) {
+               puts(", serial# ");
+               puts(buf);
        }
        putc ('\n');