summaryrefslogtreecommitdiff
path: root/physmap.c
diff options
context:
space:
mode:
authorstepan <stepan@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-06-23 10:44:36 +0000
committerstepan <stepan@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-06-23 10:44:36 +0000
commite8b7293a4728b4e8d0c57fd9b41df9c4aa6764ab (patch)
tree5042e6f531871e44cf42b3edff5ed54baf7ae307 /physmap.c
parent0fbf97c62803f9e29c0f3250f2574eab4162ca9e (diff)
downloadflashrom-e8b7293a4728b4e8d0c57fd9b41df9c4aa6764ab.tar.gz
There are some non-C99 compilers out there used to compile flashrom.
This fixes compilation for them. Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@624 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'physmap.c')
-rw-r--r--physmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/physmap.c b/physmap.c
index 4bba369..2246dfa 100644
--- a/physmap.c
+++ b/physmap.c
@@ -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)