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
Please sonar about unsecure usage of rand().
[simgrid.git]
/
teshsuite
/
smpi
/
coll-allgather
/
coll-allgather.c
diff --git
a/teshsuite/smpi/coll-allgather/coll-allgather.c
b/teshsuite/smpi/coll-allgather/coll-allgather.c
index
a6955de
..
7134a58
100644
(file)
--- a/
teshsuite/smpi/coll-allgather/coll-allgather.c
+++ b/
teshsuite/smpi/coll-allgather/coll-allgather.c
@@
-17,8
+17,7
@@
int main(int argc, char *argv[])
int size;
int status;
- srand(sg_actor_self_get_pid());
- int randomTime = rand() %5;
+ int randomTime = sg_actor_self_get_pid() % 5;
sleep(randomTime);
MPI_Init(&argc, &argv);