summaryrefslogtreecommitdiff
path: root/src/cpu/testers/traffic_gen
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-04-23 05:07:10 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-04-23 05:07:10 -0400
commit3e35fa5dcc8af49f652a20595ce2470b5a116ddc (patch)
treec19db0b1ae3c2b2cb33da3dc7e1b193214e42559 /src/cpu/testers/traffic_gen
parentc2d799c6b06384b2406c0a78da9527649f664519 (diff)
downloadgem5-3e35fa5dcc8af49f652a20595ce2470b5a116ddc.tar.xz
cpu: Fix TraceGen flag initalisation
This patch ensures the flags are always initialised.
Diffstat (limited to 'src/cpu/testers/traffic_gen')
-rw-r--r--src/cpu/testers/traffic_gen/generators.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cpu/testers/traffic_gen/generators.cc b/src/cpu/testers/traffic_gen/generators.cc
index 7fec2a34a..22fffc9c3 100644
--- a/src/cpu/testers/traffic_gen/generators.cc
+++ b/src/cpu/testers/traffic_gen/generators.cc
@@ -215,8 +215,7 @@ TraceGen::InputStream::read(TraceElement& element)
element.addr = pkt_msg.addr();
element.blocksize = pkt_msg.size();
element.tick = pkt_msg.tick();
- if (pkt_msg.has_flags())
- element.flags = pkt_msg.flags();
+ element.flags = pkt_msg.has_flags() ? pkt_msg.flags() : 0;
return true;
}