diff options
Diffstat (limited to 'board/quantum')
-rw-r--r-- | board/quantum/quantum.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/board/quantum/quantum.c b/board/quantum/quantum.c index d94b5d72a47..61c6a68b87e 100644 --- a/board/quantum/quantum.c +++ b/board/quantum/quantum.c @@ -87,14 +87,16 @@ const uint sdram_table[] = { int checkboard (void) { - char *s = getenv ("serial#"); + char buf[64]; + int i; + int l = getenv_f("serial#", buf, sizeof(buf)); puts ("Board QUANTUM, Serial No: "); - for (; s && *s; ++s) { - if (*s == ' ') + for (i = 0; i < l; ++i) { + if (buf[i] == ' ') break; - putc (*s); + putc (buf[i]); } putc ('\n'); return (0); /* success */ |