diff options
author | Stephan Guilloux <stephan.guilloux@free.fr> | 2009-06-23 10:44:36 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@coresystems.de> | 2009-06-23 10:44:36 +0000 |
commit | 9a1e36de208e3edc144faa90b68ba01f4d98b9f8 (patch) | |
tree | 5042e6f531871e44cf42b3edff5ed54baf7ae307 /physmap.c | |
parent | 718161cc285606e4ac67d45d4e1c43e543b9a4dd (diff) | |
download | flashrom-9a1e36de208e3edc144faa90b68ba01f4d98b9f8.zip flashrom-9a1e36de208e3edc144faa90b68ba01f4d98b9f8.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) |