From 0acafc02f2b8ad275861e752f8cb6833c37e4c42 Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 26 Oct 2007 20:42:22 +0000 Subject: [PATCH 1/1] Fixup the is_first semantic (does not change anything, but you're first the first time, not afterward) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4891 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/network.c | 3 --- src/surf/workstation_KCCFLN05.c | 6 +++--- src/surf/workstation_ptask_L07.c | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/surf/network.c b/src/surf/network.c index 4bcb3da4bd..9fb8024bee 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -156,9 +156,6 @@ static int link_list_capacity; static link_CM02_t *link_list = NULL; static int src_id = -1; static int dst_id = -1; -/* -static int is_first = 0; -*/ static void parse_route_set_endpoints(void) { diff --git a/src/surf/workstation_KCCFLN05.c b/src/surf/workstation_KCCFLN05.c index a160669c03..729f3e4e45 100644 --- a/src/surf/workstation_KCCFLN05.c +++ b/src/surf/workstation_KCCFLN05.c @@ -1120,14 +1120,14 @@ static double impact_on_src; static double impact_on_dst; static double impact_on_src_with_other_recv; static double impact_on_dst_with_other_send; -static int is_first = 0; +static int is_first = 1; static void parse_route_set_endpoints(void) { cpu_KCCFLN05_t cpu_tmp = NULL; - if (!is_first) create_routing_table(); - is_first = 1; + if (is_first) create_routing_table(); + is_first = 0; cpu_tmp = (cpu_KCCFLN05_t) name_service(A_surfxml_route_src); if (cpu_tmp != NULL) { diff --git a/src/surf/workstation_ptask_L07.c b/src/surf/workstation_ptask_L07.c index 774d540c13..1d2c49e0db 100644 --- a/src/surf/workstation_ptask_L07.c +++ b/src/surf/workstation_ptask_L07.c @@ -861,14 +861,14 @@ static int link_list_capacity; static link_L07_t *link_list = NULL; static int src_id = -1; static int dst_id = -1; -static int is_first =0; +static int is_first =1; static void parse_route_set_endpoints(void) { cpu_L07_t cpu_tmp = NULL; - if (!is_first) create_routing_table(); - is_first = 1; + if (is_first) create_routing_table(); + is_first = 0; cpu_tmp = (cpu_L07_t) name_service(A_surfxml_route_src); xbt_assert1(cpu_tmp, "Invalid cpu %s", A_surfxml_route_src); -- 2.20.1