X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=action.cc;h=a11467587901f258a03b9e11623403f60f3d1263;hb=cb9bcfa58847b8261c41890d517918260d409bdd;hp=e88fceef66a8d173e851f4439afd55f1d96564f4;hpb=2cf946f3bf4f12d2a353fb0c4f4644a6b2f65e56;p=model-checker.git diff --git a/action.cc b/action.cc index e88fcee..a114675 100644 --- a/action.cc +++ b/action.cc @@ -470,7 +470,11 @@ void ModelAction::print() const type_str = "unknown type"; } - uint64_t valuetoprint=type==ATOMIC_READ?(reads_from!=NULL?reads_from->value:VALUE_NONE):value; + uint64_t valuetoprint; + if (type == ATOMIC_READ && reads_from != NULL) + valuetoprint = reads_from->value; + else + valuetoprint = value; switch (this->order) { case std::memory_order_relaxed: