From 3cee343c2f93c3bf4667131e618f01fa692e1138 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 8 Mar 2014 18:28:21 +0100 Subject: [PATCH] Cosmetics. --- examples/msg/pastry/pastry.c | 4 ++-- src/simix/smx_global.c | 3 +-- src/simix/smx_io.c | 4 ++-- src/simix/smx_smurf.c | 4 ++-- src/surf/storage_interface.cpp | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/msg/pastry/pastry.c b/examples/msg/pastry/pastry.c index 45300c774b..da3f463757 100644 --- a/examples/msg/pastry/pastry.c +++ b/examples/msg/pastry/pastry.c @@ -213,7 +213,7 @@ static void handle_task(node_t node, msg_task_t task) { /* * Try to join the ring */ - case TASK_JOIN:; + case TASK_JOIN: { int next = routing_next(node, task_data->answer_id); XBT_DEBUG("Join request from %08x forwarding to %08x", task_data->answer_id, next); type = TASK_JOIN_LAST_REPLY; @@ -240,7 +240,7 @@ static void handle_task(node_t node, msg_task_t task) { task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data); MSG_task_send_with_timeout(task_sent, task_data->answer_to, timeout); break; - + } /* * Join reply from all the node touched by the join */ diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 5d2b942d32..213b41bf16 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -327,8 +327,7 @@ void SIMIX_run(void) /* Wake up all processes waiting for a Surf action to finish */ xbt_dynar_foreach(model_list, iter, model) { while ((action = surf_model_extract_failed_action_set(model))) - - SIMIX_simcall_post((smx_action_t) surf_action_get_data(action)); + SIMIX_simcall_post((smx_action_t) surf_action_get_data(action)); while ((action = surf_model_extract_done_action_set(model))) if (surf_action_get_data(action) == NULL) diff --git a/src/simix/smx_io.c b/src/simix/smx_io.c index f504da422f..7e86d4b965 100644 --- a/src/simix/smx_io.c +++ b/src/simix/smx_io.c @@ -406,12 +406,12 @@ void SIMIX_post_io(smx_action_t action) xbt_fifo_foreach(action->simcalls,i,simcall,smx_simcall_t) { switch (simcall->call) { - case SIMCALL_FILE_OPEN:; + case SIMCALL_FILE_OPEN: { smx_file_t tmp = xbt_new(s_smx_file_t,1); tmp->surf_file = surf_storage_action_get_file(action->io.surf_io); simcall_file_open__set__result(simcall, tmp); break; - + } case SIMCALL_FILE_CLOSE: xbt_free(simcall_file_close__get__fd(simcall)); simcall_file_close__set__result(simcall, 0); diff --git a/src/simix/smx_smurf.c b/src/simix/smx_smurf.c index 77623e70ee..b76914ff0d 100644 --- a/src/simix/smx_smurf.c +++ b/src/simix/smx_smurf.c @@ -61,9 +61,9 @@ void SIMIX_simcall_pre(smx_simcall_t simcall, int value) return; switch (simcall->call) { #include "simcalls_generated_case.c" - case NUM_SIMCALLS:; + case NUM_SIMCALLS: break; - case SIMCALL_NONE:; + case SIMCALL_NONE: THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s", SIMIX_process_get_name(simcall->issuer), SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer)) diff --git a/src/surf/storage_interface.cpp b/src/surf/storage_interface.cpp index fb5ac01269..90e14c7939 100644 --- a/src/surf/storage_interface.cpp +++ b/src/surf/storage_interface.cpp @@ -72,7 +72,7 @@ Storage::Storage(ModelPtr model, const char *name, xbt_dict_t props, , p_writeActions(xbt_dynar_new(sizeof(ActionPtr),NULL)) { surf_callback_emit(storageCreatedCallbacks, this); p_content = parseContent(content_name); - p_attach = (xbt_strdup(attach)); + p_attach = xbt_strdup(attach); setState(SURF_RESOURCE_ON); XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size); p_constraintRead = lmm_constraint_new(maxminSystem, this, bread); -- 2.20.1