This patch changes two dynamic_cast to safe_cast as we assume the
return value is not NULL (without checking).
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>();
// 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;
}