summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-09-11 14:15:47 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-09-11 14:15:47 -0400
commit292d8252a4a03b7f2ef48f6f86311ac35020095d (patch)
tree54c6914006282e7c4966ea82b64494250f39baea /src/mem/ruby/system
parent9ad7e23e9e277b13fd7cbe3b123b2d72f8817269 (diff)
downloadgem5-292d8252a4a03b7f2ef48f6f86311ac35020095d.tar.xz
clang: Fix issues identified by the clang static analyzer
This patch addresses a few minor issues reported by the clang static analyzer. The analysis was run with: scan-build -disable-checker deadcode \ -enable-checker experimental.core \ -disable-checker experimental.core.CastToStruct \ -enable-checker experimental.cpluscplus
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r--src/mem/ruby/system/Sequencer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc
index c48ff59cf..efb0b002e 100644
--- a/src/mem/ruby/system/Sequencer.cc
+++ b/src/mem/ruby/system/Sequencer.cc
@@ -645,8 +645,9 @@ Sequencer::makeRequest(PacketPtr pkt)
void
Sequencer::issueRequest(PacketPtr pkt, RubyRequestType secondary_type)
{
+ assert(pkt != NULL);
int proc_id = -1;
- if (pkt != NULL && pkt->req->hasContextId()) {
+ if (pkt->req->hasContextId()) {
proc_id = pkt->req->contextId();
}