From: Arnaud Giersch Date: Fri, 27 Apr 2012 10:03:58 +0000 (+0200) Subject: Cosmetics: a switch..case is clearer here. X-Git-Tag: v3_7~47 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8cda1f6e4b63ac3231ec48ec1db82aaaf189c393 Cosmetics: a switch..case is clearer here. --- diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 4555093bcd..0de13d2811 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -165,12 +165,17 @@ XBT_INLINE double SIMIX_get_clock(void) } } -static int process_syscall_color(void *p) { - e_smx_simcall_t s = (*((smx_process_t *)p))->simcall.call; - - if (s == SIMCALL_NONE || s == SIMCALL_PROCESS_KILL) return 2; - else if (s == SIMCALL_PROCESS_RESUME) return 1; - else return 0; +static int process_syscall_color(void *p) +{ + switch ((*(smx_process_t *)p)->simcall.call) { + case SIMCALL_NONE: + case SIMCALL_PROCESS_KILL: + return 2; + case SIMCALL_PROCESS_RESUME: + return 1; + default: + return 0; + } } void SIMIX_run(void)