1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

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>
This commit is contained in:
Stephan Guilloux 2009-06-23 10:44:36 +00:00 committed by Stefan Reinauer
parent 2c7ba8ce70
commit 6d08a3ea04

View File

@ -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 *physmap(const char *descr, unsigned long phys_addr, size_t len)
{ {
void *virt_addr;
if (len == 0) { if (len == 0) {
printf_debug("Not mapping %s, zero size at 0x%08lx.\n", printf_debug("Not mapping %s, zero size at 0x%08lx.\n",
descr, phys_addr); 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); 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 == virt_addr) {
if (NULL == descr) if (NULL == descr)