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>
diff --git a/physmap.c b/physmap.c
index 4bba369..2246dfa 100644
--- a/physmap.c
+++ b/physmap.c
@@ -80,6 +80,8 @@
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 @@
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)