From: Nathan Binkert Date: Fri, 26 Sep 2008 15:18:57 +0000 (-0700) Subject: When nesting if statements, use braces to avoid ambiguous else clauses. X-Git-Tag: m5_2.0_beta6~26 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9838be252114cf044735ca07007d23ee03d8da2c;p=gem5.git When nesting if statements, use braces to avoid ambiguous else clauses. --- diff --git a/src/arch/sparc/tlb_map.hh b/src/arch/sparc/tlb_map.hh index 8285db939..fa49584ba 100644 --- a/src/arch/sparc/tlb_map.hh +++ b/src/arch/sparc/tlb_map.hh @@ -52,7 +52,7 @@ class TlbMap i = tree.upper_bound(r); - if (i == tree.begin()) + if (i == tree.begin()) { if (r.real == i->first.real && r.partitionId == i->first.partitionId && i->first.va < r.va + r.size && @@ -62,6 +62,7 @@ class TlbMap else // Nothing could match, so return end() return tree.end(); + } i--; diff --git a/src/mem/bridge.cc b/src/mem/bridge.cc index c09cacc00..2e668ec32 100644 --- a/src/mem/bridge.cc +++ b/src/mem/bridge.cc @@ -130,7 +130,7 @@ Bridge::BridgePort::recvTiming(PacketPtr pkt) return true; } - if (pkt->needsResponse()) + if (pkt->needsResponse()) { if (respQueueFull()) { DPRINTF(BusBridge, "Local queue full, no space for response, nacking\n"); DPRINTF(BusBridge, "queue size: %d outreq: %d outstanding resp: %d\n", @@ -141,6 +141,7 @@ Bridge::BridgePort::recvTiming(PacketPtr pkt) DPRINTF(BusBridge, "Request Needs response, reserving space\n"); ++outstandingResponses; } + } otherPort->queueForSendTiming(pkt);