From: Martin Quinson Date: Mon, 12 Dec 2016 14:30:04 +0000 (+0100) Subject: don't fool sonar if we can avoid it X-Git-Tag: v3_14~66 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bd32035978e59b9c64d5c3c8b6156b52b64be138?hp=f9629b903536da09a11809f9a61a9dda0726f30e don't fool sonar if we can avoid it --- diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 88b131c5dd..26ba9599a2 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -368,7 +368,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz for (auto link: *route) lmm_expand(maxminSystem_, link->getConstraint(), action->getVariable(), 1.0); - if (sg_network_crosstraffic == 1) { + if (back_route != nullptr) { // sg_network_crosstraffic was activated XBT_DEBUG("Fullduplex active adding backward flow using 5%%"); for (auto link : *back_route) lmm_expand(maxminSystem_, link->getConstraint(), action->getVariable(), .05);