From: Frederic Suter Date: Thu, 11 Aug 2016 07:17:34 +0000 (+0200) Subject: fix some introduced smells X-Git-Tag: v3_14~582 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3c93187d86c5a44334d765fd56b722fbb5584e38?ds=sidebyside fix some introduced smells --- diff --git a/examples/msg/dht-chord/dht-chord.c b/examples/msg/dht-chord/dht-chord.c index bb59f78943..29a25a0020 100644 --- a/examples/msg/dht-chord/dht-chord.c +++ b/examples/msg/dht-chord/dht-chord.c @@ -738,8 +738,9 @@ static int node(int argc, char *argv[]) if (join_success) { double now = MSG_get_clock(); + int listen = 0; + int no_op = 0; while (now < init_time + deadline && now < max_simulation_time) { - if (node.comm_receive == NULL) { task_received = NULL; node.comm_receive = MSG_task_irecv(&task_received, node.mailbox); @@ -748,8 +749,6 @@ static int node(int argc, char *argv[]) if (!MSG_comm_test(node.comm_receive)) { // no task was received: make some periodic calls if(MC_is_active() || MC_record_replay_is_active()){ - int listen = 0; - int no_op = 0; int sub_protocol = MC_random(0, 4); if(MC_is_active() && !MC_visited_reduction() && no_op) MC_cut(); diff --git a/examples/msg/dht-chord/dht-chord.h b/examples/msg/dht-chord/dht-chord.h index d2d17e6263..579b7647eb 100644 --- a/examples/msg/dht-chord/dht-chord.h +++ b/examples/msg/dht-chord/dht-chord.h @@ -21,7 +21,6 @@ typedef struct s_finger { char mailbox[MAILBOX_NAME_SIZE]; // string representation of the id } s_finger_t; -typedef s_finger_t *finger_t; /* Node data. */ typedef struct s_node { diff --git a/examples/msg/dht-pastry/dht-pastry.c b/examples/msg/dht-pastry/dht-pastry.c index 270cb94aed..ade7a76601 100644 --- a/examples/msg/dht-pastry/dht-pastry.c +++ b/examples/msg/dht-pastry/dht-pastry.c @@ -583,7 +583,7 @@ int main(int argc, char *argv[]) timeout = xbt_str_parse_int(options[0] + length, "Invalid timeout parameter: %s"); XBT_DEBUG("Set timeout to %d", timeout); } else { - xbt_die("Invalid chord option '%s'", options[0]); + xbt_die("Invalid pastry option '%s'", options[0]); } } options++;