X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/624be7bba85ad8836fd648834395bf4dfacfe54d..22000124cfde898c839f9581a9088d80b162e0c5:/examples/msg/properties/properties.c diff --git a/examples/msg/properties/properties.c b/examples/msg/properties/properties.c index 178de370e7..7df8112a64 100644 --- a/examples/msg/properties/properties.c +++ b/examples/msg/properties/properties.c @@ -93,9 +93,7 @@ static int bob(int argc, char *argv[]) int main(int argc, char *argv[]) { - msg_error_t res = MSG_OK; unsigned int i; - xbt_dynar_t hosts; msg_host_t host; MSG_init(&argc, argv); @@ -111,17 +109,15 @@ int main(int argc, char *argv[]) XBT_INFO("There are %d hosts in the environment", MSG_get_host_number()); - hosts = MSG_hosts_as_dynar(); - + xbt_dynar_t hosts = MSG_hosts_as_dynar(); xbt_dynar_foreach(hosts, i, host){ XBT_INFO("Host '%s' runs at %.0f flops/s",MSG_host_get_name(host), MSG_host_get_speed(host)); } + xbt_dynar_free(&hosts); MSG_launch_application(argv[2]); - res = MSG_main(); - - xbt_dynar_free(&hosts); + msg_error_t res = MSG_main(); return res!=MSG_OK; }