A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'coverity_scan' of github.com:mquinson/simgrid
[simgrid.git]
/
examples
/
msg
/
chainsend
/
broadcaster.c
diff --git
a/examples/msg/chainsend/broadcaster.c
b/examples/msg/chainsend/broadcaster.c
index
507167a
..
112bb25
100644
(file)
--- a/
examples/msg/chainsend/broadcaster.c
+++ b/
examples/msg/chainsend/broadcaster.c
@@
-1,3
+1,9
@@
+/* Copyright (c) 2012-2014. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
#include "broadcaster.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_broadcaster,
#include "broadcaster.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_broadcaster,
@@
-112,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 */
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) {
/* 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);
XBT_DEBUG("piece_count set to %d", piece_count);
} else {
XBT_DEBUG("No piece_count specified, defaulting to %d", piece_count);