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 by removing useless asignments and return statements
[simgrid.git]
/
examples
/
msg
/
app-bittorrent
/
tracker.c
diff --git
a/examples/msg/app-bittorrent/tracker.c
b/examples/msg/app-bittorrent/tracker.c
index
72ff0d1
..
c6e9255
100644
(file)
--- a/
examples/msg/app-bittorrent/tracker.c
+++ b/
examples/msg/app-bittorrent/tracker.c
@@
-20,7
+20,7
@@
int tracker(int argc, char *argv[])
{
int i;
- RngStream stream = (RngStream)
MSG_host_get_property_value(MSG_host_self(), "stream"
);
+ RngStream stream = (RngStream)
MSG_host_get_data(MSG_host_self()
);
//Checking arguments
xbt_assert(argc == 2, "Wrong number of arguments for the tracker.");
//Retrieving end time
@@
-44,7
+44,7
@@
int tracker(int argc, char *argv[])
//Retrieve the data sent by the peer.
tracker_task_data_t data = MSG_task_get_data(task_received);
//Add the peer to our peer list.
- if (
!is_in_list(peers_list, data->peer_id)
) {
+ if (
is_in_list(peers_list, data->peer_id) == 0
) {
xbt_dynar_push_as(peers_list, int, data->peer_id);
}
//Sending peers to the peer