From 3e35fa5dcc8af49f652a20595ce2470b5a116ddc Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 23 Apr 2013 05:07:10 -0400 Subject: [PATCH] cpu: Fix TraceGen flag initalisation This patch ensures the flags are always initialised. --- src/cpu/testers/traffic_gen/generators.cc | 3 +-- 1 file changed, 1 insertion(+), 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; } -- 2.30.2