X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/49e85177c669d793e84242983a1b1f430e47184e..ee9ae717297c900fdfed52ed22739a9591b04cba:/examples/msg/chainsend/broadcaster.c diff --git a/examples/msg/chainsend/broadcaster.c b/examples/msg/chainsend/broadcaster.c index 5daf3d5fa7..112bb25db2 100644 --- a/examples/msg/chainsend/broadcaster.c +++ b/examples/msg/chainsend/broadcaster.c @@ -118,11 +118,11 @@ int broadcaster(int argc, char *argv[]) XBT_DEBUG("broadcaster"); /* Add every mailbox given by the hostcount in argv[1] to a dynamic array */ - host_list = build_hostlist_from_hostcount(atoi(argv[1])); + host_list = build_hostlist_from_hostcount(xbt_str_parse_int(argv[1], "Invalid number of peers: %s")); /* argv[2] is the number of pieces */ if (argc > 2) { - piece_count = atoi(argv[2]); + piece_count = xbt_str_parse_int(argv[2], "Invalid number of pieces: %s"); XBT_DEBUG("piece_count set to %d", piece_count); } else { XBT_DEBUG("No piece_count specified, defaulting to %d", piece_count);