Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 2 Feb 2016 21:07:59 +0000 (22:07 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 2 Feb 2016 21:07:59 +0000 (22:07 +0100)
src/simix/smx_process.cpp
src/xbt/xbt_os_thread.c

index 6078923..9ced079 100644 (file)
@@ -155,7 +155,6 @@ void SIMIX_create_maestro_process()
   maestro->context = SIMIX_context_new(NULL, 0, NULL, NULL, maestro);
   maestro->simcall.issuer = maestro;
   simix_global->maestro_process = maestro;
-  return;
 }
 /**
  * \brief Stops a process.
index f7ed95e..3ef350b 100644 (file)
@@ -291,14 +291,10 @@ void xbt_os_thread_exit(int *retval)
 
 xbt_os_thread_t xbt_os_thread_self(void)
 {
-  xbt_os_thread_t res;
-
   if (!thread_mod_inited)
     return NULL;
 
-  res = pthread_getspecific(xbt_self_thread_key);
-
-  return res;
+  return pthread_getspecific(xbt_self_thread_key);
 }
 
 void xbt_os_thread_key_create(xbt_os_thread_key_t* key) {
@@ -1303,8 +1299,7 @@ void xbt_os_thread_set_extra_data(void *data)
 
 void *xbt_os_thread_get_extra_data(void)
 {
-  xbt_os_thread_t self = xbt_os_thread_self();
-  return self? self->extra_data : NULL;
+  return xbt_os_thread_self()->extra_data;
 }
 
 xbt_os_rmutex_t xbt_os_rmutex_init(void)