diff options
author | Stephan Guilloux <stephan.guilloux@free.fr> | 2009-06-23 10:44:36 +0000 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2009-06-23 10:44:36 +0000 |
commit | 6d08a3ea0487567552488308ddf490a1ac8e6e81 (patch) | |
tree | 5042e6f531871e44cf42b3edff5ed54baf7ae307 /physmap.c | |
parent | 2c7ba8ce706da91e31d53b3c4fdc43d91ce0a2cf (diff) | |
download | ast2050-flashrom-6d08a3ea0487567552488308ddf490a1ac8e6e81.zip ast2050-flashrom-6d08a3ea0487567552488308ddf490a1ac8e6e81.tar.gz |
There are some non-C99 compilers out there used to compile flashrom
This fixes compilation for them.
Corresponding to flashrom svn r624.
Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Diffstat (limited to 'physmap.c')
-rw-r--r-- | physmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -80,6 +80,8 @@ void physunmap(void *virt_addr, size_t len) void *physmap(const char *descr, unsigned long phys_addr, size_t len) { + void *virt_addr; + if (len == 0) { printf_debug("Not mapping %s, zero size at 0x%08lx.\n", descr, phys_addr); @@ -96,7 +98,7 @@ void *physmap(const char *descr, unsigned long phys_addr, size_t len) descr, (unsigned long)len, phys_addr); } - void *virt_addr = sys_physmap(phys_addr, len); + virt_addr = sys_physmap(phys_addr, len); if (NULL == virt_addr) { if (NULL == descr) |