From: Arnaud Giersch Date: Thu, 14 Feb 2013 14:26:02 +0000 (+0100) Subject: Simply say func(...) instead of (*func)(...) when func is a pointer to function. X-Git-Tag: v3_9_90~491^2~22 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b5460be431061e47e22509daff9cb6e8e7e3fd5b Simply say func(...) instead of (*func)(...) when func is a pointer to function. --- diff --git a/src/bindings/java/smx_context_cojava.c b/src/bindings/java/smx_context_cojava.c index 9e69d06e57..4d5dd53adc 100644 --- a/src/bindings/java/smx_context_cojava.c +++ b/src/bindings/java/smx_context_cojava.c @@ -203,7 +203,7 @@ static void smx_ctx_cojava_suspend(smx_context_t context) XBT_DEBUG("Switching to %p",my_current_context); smx_ctx_cojava_t java_context = (smx_ctx_cojava_t)(next_context); if (!java_context->jprocess) { - (*(java_context->super.code))(java_context->super.argc, java_context->super.argv); + java_context->super.code(java_context->super.argc, java_context->super.argv); smx_ctx_cojava_create_coroutine(java_context); } else if (!java_context->bound) { @@ -230,7 +230,7 @@ static void smx_ctx_cojava_resume(smx_context_t new_context) { smx_ctx_cojava_t java_context = (smx_ctx_cojava_t)(new_context); if (!java_context->jprocess) { - (*(java_context->super.code))(java_context->super.argc, java_context->super.argv); + java_context->super.code(java_context->super.argc, java_context->super.argv); smx_ctx_cojava_create_coroutine(java_context); java_context->bound = 1; } diff --git a/src/bindings/java/smx_context_java.c b/src/bindings/java/smx_context_java.c index dc5a3ddc39..92005a4550 100644 --- a/src/bindings/java/smx_context_java.c +++ b/src/bindings/java/smx_context_java.c @@ -104,7 +104,7 @@ static void* smx_ctx_java_thread_run(void *data) { xbt_os_sem_acquire(context->begin); //Create the "Process" object if needed. if (context->super.argc > 0) { - (*(context->super.code))(context->super.argc, context->super.argv); + context->super.code(context->super.argc, context->super.argv); } else { smx_process_t process = SIMIX_process_self(); diff --git a/src/mc/mc_liveness.c b/src/mc/mc_liveness.c index 8f2dadcff5..8d01745cf7 100644 --- a/src/mc/mc_liveness.c +++ b/src/mc/mc_liveness.c @@ -71,7 +71,7 @@ int reached(xbt_state_t st){ xbt_propositional_symbol_t ps = NULL; xbt_dynar_foreach(_mc_property_automaton->propositional_symbols, cursor, ps){ f = (int_f_void_t)ps->function; - res = (*f)(); + res = f(); xbt_dynar_push_as(new_pair->prop_ato, int, res); } @@ -155,7 +155,7 @@ void set_pair_reached(xbt_state_t st){ xbt_dynar_foreach(_mc_property_automaton->propositional_symbols, cursor, ps){ f = (int_f_void_t)ps->function; - res = (*f)(); + res = f(); xbt_dynar_push_as(pair->prop_ato, int, res); } @@ -190,7 +190,7 @@ int visited(xbt_state_t st){ xbt_propositional_symbol_t ps = NULL; xbt_dynar_foreach(_mc_property_automaton->propositional_symbols, cursor, ps){ f = (int_f_void_t)ps->function; - res = (*f)(); + res = f(); xbt_dynar_push_as(new_pair->prop_ato, int, res); } @@ -285,7 +285,7 @@ int MC_automaton_evaluate_label(xbt_exp_label_t l){ xbt_dynar_foreach(_mc_property_automaton->propositional_symbols, cursor, p){ if(strcmp(p->pred, l->u.predicat) == 0){ f = (int_f_void_t)p->function; - return (*f)(); + return f(); } } return -1;