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