diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-19 10:35:11 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-19 10:35:11 -0400 |
commit | efd5cf323ab9ba91487d975899f13353d3258e83 (patch) | |
tree | 51fbbd7f82c481fe41e3cab2d714bef9c7e15cfd /src/cpu/testers/memtest | |
parent | 32c111eda40269b0047ba3c109b7a2ba878d2544 (diff) | |
download | gem5-efd5cf323ab9ba91487d975899f13353d3258e83.tar.xz |
misc: Use safe_cast when assumptions are made about return value
This patch changes two dynamic_cast to safe_cast as we assume the
return value is not NULL (without checking).
Diffstat (limited to 'src/cpu/testers/memtest')
-rw-r--r-- | src/cpu/testers/memtest/memtest.cc | 2 |
1 files changed, 1 insertions, 1 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>(); |