Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix some introduced smells
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 11 Aug 2016 07:17:34 +0000 (09:17 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 11 Aug 2016 07:17:34 +0000 (09:17 +0200)
examples/msg/dht-chord/dht-chord.c
examples/msg/dht-chord/dht-chord.h
examples/msg/dht-pastry/dht-pastry.c

index bb59f78..29a25a0 100644 (file)
@@ -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();
index d2d17e6..579b764 100644 (file)
@@ -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 {
index 270cb94..ade7a76 100644 (file)
@@ -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++;