Fix incorrect use of getenv() before relocation
[pandora-u-boot.git] / board / zeus / zeus.c
index 7e33d3f..18cb85f 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');