Commit 6d08a3ea authored by Stephan Guilloux's avatar Stephan Guilloux Committed by Stefan Reinauer
Browse files

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: default avatarStephan Guilloux <stephan.guilloux@free.fr>
Acked-by: default avatarStefan Reinauer <stepan@coresystems.de>
parent 2c7ba8ce
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment