When nesting if statements, use braces to avoid ambiguous else clauses.

This commit is contained in:
Nathan Binkert 2008-09-26 08:18:57 -07:00
parent abca171e24
commit 9838be2521
2 changed files with 4 additions and 2 deletions

View file

@ -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--;

View file

@ -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);