Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to get rid of some errors seen by scan-build
[simgrid.git] / src / kernel / routing / FullZone.cpp
index ece81d3..429f079 100644 (file)
@@ -106,7 +106,7 @@ void FullZone::addRoute(sg_platf_route_cbarg_t route)
       route->gw_src   = route->gw_dst;
       route->gw_dst   = gw_tmp;
     }
-    if (route->gw_dst) // inter-zone route (to adapt the error message, if any)
+    if (route->gw_dst && route->gw_src) // inter-zone route (to adapt the error message, if any)
       xbt_assert(
           nullptr == TO_ROUTE_FULL(dst->id(), src->id()),
           "The route between %s@%s and %s@%s already exists. You should not declare the reverse path as symmetrical.",