Fix incorrect use of getenv() before relocation
[oweals/u-boot.git] / board / zeus / zeus.c
index 7e33d3f38318d24e5e178124653a6935e99edc10..18cb85faf3371797bb18a10ee1fab9427ade3deb 100644 (file)
@@ -161,7 +161,8 @@ int misc_init_r(void)
  */
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        puts("Board: Zeus-");
 
@@ -172,9 +173,9 @@ int checkboard(void)
 
        puts(" of BulletEndPoint");
 
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');