summaryrefslogtreecommitdiff
path: root/src/mem/bus.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r--src/mem/bus.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index cfddfff12..f47d48d0b 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -105,7 +105,7 @@ void Bus::BusFreeEvent::process()
bus->recvRetry(-1);
}
-const char * Bus::BusFreeEvent::description()
+const char * Bus::BusFreeEvent::description() const
{
return "bus became available";
}
@@ -307,9 +307,10 @@ Bus::findPort(Addr addr)
dest_id = checkPortCache(addr);
if (dest_id == -1) {
PortIter i = portMap.find(RangeSize(addr,1));
- if (i != portMap.end())
- dest_id = i->second;
- updatePortCache(dest_id, i->first.start, i->first.end);
+ if (i != portMap.end()) {
+ dest_id = i->second;
+ updatePortCache(dest_id, i->first.start, i->first.end);
+ }
}
// Check if this matches the default range