summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/testers/memtest/memtest.cc2
-rw-r--r--src/mem/packet.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/testers/memtest/memtest.cc b/src/cpu/testers/memtest/memtest.cc
index 6dc2ccb73..d949178c2 100644
--- a/src/cpu/testers/memtest/memtest.cc
+++ b/src/cpu/testers/memtest/memtest.cc
@@ -170,7 +170,7 @@ MemTest::completeRequest(PacketPtr pkt)
pkt->isError() ? "error" : "success");
MemTestSenderState *state =
- dynamic_cast<MemTestSenderState *>(pkt->senderState);
+ safe_cast<MemTestSenderState *>(pkt->senderState);
uint8_t *data = state->data;
uint8_t *pkt_data = pkt->getPtr<uint8_t>();
diff --git a/src/mem/packet.cc b/src/mem/packet.cc
index 5b0834285..8bbd7ff18 100644
--- a/src/mem/packet.cc
+++ b/src/mem/packet.cc
@@ -189,7 +189,7 @@ Packet::checkFunctional(Printable *obj, Addr addr, bool is_secure, int size,
// check print first since it doesn't require data
if (isPrint()) {
- dynamic_cast<PrintReqState*>(senderState)->printObj(obj);
+ safe_cast<PrintReqState*>(senderState)->printObj(obj);
return false;
}