X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ee7e9c2e455536ab817ae0136acfbb53822eecd..9b73466ada27682d1729f394549479da83ef4a99:/src/surf/fair_bottleneck.c diff --git a/src/surf/fair_bottleneck.c b/src/surf/fair_bottleneck.c index 9ddb5a690e..8830107a0a 100644 --- a/src/surf/fair_bottleneck.c +++ b/src/surf/fair_bottleneck.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2007-2011. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ void bottleneck_solve(lmm_system_t sys) xbt_swag_t cnst_list = NULL; xbt_swag_t var_list = NULL; xbt_swag_t elem_list = NULL; - double min_usage = -1; int i; static s_xbt_swag_t cnst_to_update; @@ -87,7 +86,6 @@ void bottleneck_solve(lmm_system_t sys) } XBT_DEBUG("******* Constraints to process: %d *******", xbt_swag_size(cnst_list)); - min_usage = -1; xbt_swag_foreach_safe(cnst, cnst_next, cnst_list) { int nb = 0; XBT_DEBUG("Processing cnst %p ", cnst); @@ -174,9 +172,7 @@ void bottleneck_solve(lmm_system_t sys) } } while (xbt_swag_size(var_list)); - xbt_swag_foreach_safe(cnst, cnst_next, cnst_list) { - xbt_swag_remove(cnst, cnst_list); - } + xbt_swag_reset(cnst_list); sys->modified = 0; if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) { XBT_DEBUG("Fair bottleneck done");