mem: Check return value of checkFunctional in SimpleMemory

Simple fix to ensure we only iterate until we are done.
This commit is contained in:
Andreas Hansson 2014-09-19 10:35:06 -04:00
parent 38646d48eb
commit 377f081251

View file

@ -80,9 +80,13 @@ SimpleMemory::recvFunctional(PacketPtr pkt)
functionalAccess(pkt);
bool done = false;
auto p = packetQueue.begin();
// potentially update the packets in our packet queue as well
for (auto i = packetQueue.begin(); i != packetQueue.end(); ++i)
pkt->checkFunctional(i->pkt);
while (!done && p != packetQueue.end()) {
done = pkt->checkFunctional(p->pkt);
++p;
}
pkt->popLabel();
}