Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Cleanup horrible for loop
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 5 May 2015 12:46:40 +0000 (14:46 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 5 May 2015 12:47:45 +0000 (14:47 +0200)
src/mc/mc_global.cpp

index 076f146..337b1ba 100644 (file)
@@ -456,8 +456,8 @@ void MC_show_stack_liveness(xbt_fifo_t stack)
   char *req_str = NULL;
 
   for (item = xbt_fifo_get_last_item(stack);
-       (item ? (pair = (mc_pair_t) (xbt_fifo_get_item_content(item))) : (NULL));
-       item = xbt_fifo_get_prev_item(item)) {
+       item; item = xbt_fifo_get_prev_item(item)) {
+    pair = (mc_pair_t) xbt_fifo_get_item_content(item);
     req = MC_state_get_executed_request(pair->graph_state, &value);
     if (req && req->call != SIMCALL_NONE) {
       req_str = MC_request_to_string(req, value, MC_REQUEST_EXECUTED);