From 1ab0eff2f5b181058fe73c9ada237f3dc5287283 Mon Sep 17 00:00:00 2001 From: navarro Date: Mon, 23 Jan 2012 11:13:43 +0100 Subject: [PATCH] Place MSG init before testing args for --help argument. --- examples/msg/chord/chord.c | 3 +-- examples/msg/chord/chord_stateful.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/msg/chord/chord.c b/examples/msg/chord/chord.c index 5a18518fc1..f6ce033da1 100644 --- a/examples/msg/chord/chord.c +++ b/examples/msg/chord/chord.c @@ -876,14 +876,13 @@ static void random_lookup(node_t node) */ int main(int argc, char *argv[]) { + MSG_global_init(&argc, argv); if (argc < 3) { printf("Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n", argv[0]); printf("example: %s ../msg_platform.xml chord.xml\n", argv[0]); exit(1); } - MSG_global_init(&argc, argv); - char **options = &argv[1]; while (!strncmp(options[0], "-", 1)) { diff --git a/examples/msg/chord/chord_stateful.c b/examples/msg/chord/chord_stateful.c index 5a1c2cf97e..57fd00a4ac 100644 --- a/examples/msg/chord/chord_stateful.c +++ b/examples/msg/chord/chord_stateful.c @@ -892,14 +892,13 @@ int main(int argc, char *argv[]) { xbt_os_timer_t timer = xbt_os_timer_new(); + MSG_global_init(&argc, argv); if (argc < 3) { printf("Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n", argv[0]); printf("example: %s ../msg_platform.xml chord.xml\n", argv[0]); exit(1); } - MSG_global_init(&argc, argv); - char **options = &argv[1]; while (!strncmp(options[0], "-", 1)) { -- 2.20.1