From 83f28c874af4faaeaaa19571afc2cd52c801da39 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 14 Feb 2019 13:45:52 +0100 Subject: [PATCH] Cosmetics (and please scan-build about potential null surf_action_). --- src/kernel/activity/CommImpl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/kernel/activity/CommImpl.cpp b/src/kernel/activity/CommImpl.cpp index f16fe42313..34e15450d3 100644 --- a/src/kernel/activity/CommImpl.cpp +++ b/src/kernel/activity/CommImpl.cpp @@ -85,11 +85,10 @@ void CommImpl::start() receiver->get_cname()); state_ = SIMIX_LINK_FAILURE; cleanupSurf(); - } - /* If any of the process is suspended, create the synchro but stop its execution, - it will be restarted when the sender process resume */ - if (src_actor_->is_suspended() || dst_actor_->is_suspended()) { + } else if (src_actor_->is_suspended() || dst_actor_->is_suspended()) { + /* If any of the process is suspended, create the synchro but stop its execution, + it will be restarted when the sender process resume */ if (src_actor_->is_suspended()) XBT_DEBUG("The communication is suspended on startup because src (%s@%s) was suspended since it initiated the " "communication", -- 2.20.1