From: Andreas Hansson Date: Tue, 23 Apr 2013 09:07:10 +0000 (-0400) Subject: cpu: Fix TraceGen flag initalisation X-Git-Tag: stable_2013_10_14~129 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e35fa5dcc8af49f652a20595ce2470b5a116ddc;p=gem5.git cpu: Fix TraceGen flag initalisation This patch ensures the flags are always initialised. --- 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; }