summaryrefslogtreecommitdiffstats
path: root/physmap.c
diff options
context:
space:
mode:
authorStephan Guilloux <stephan.guilloux@free.fr>2009-06-23 10:44:36 +0000
committerStefan Reinauer <stepan@coresystems.de>2009-06-23 10:44:36 +0000
commit9a1e36de208e3edc144faa90b68ba01f4d98b9f8 (patch)
tree5042e6f531871e44cf42b3edff5ed54baf7ae307 /physmap.c
parent718161cc285606e4ac67d45d4e1c43e543b9a4dd (diff)
downloadflashrom-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.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)
OpenPOWER on IntegriCloud