]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/mosaixtech/icon/icon.c
Fix incorrect use of getenv() before relocation
[people/ms/u-boot.git] / board / mosaixtech / icon / icon.c
index e09dbc3df0d2fddc5b09267ac87f765b644f6b5a..e464e4395cadc659a275937cb821550db7dcdcd7 100644 (file)
@@ -275,12 +275,13 @@ int board_early_init_r(void)
 
 int checkboard(void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        printf("Board: ICON");
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');