A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not declare variable in the middle of nowhere!
[simgrid.git]
/
src
/
simix
/
smx_deployment.c
diff --git
a/src/simix/smx_deployment.c
b/src/simix/smx_deployment.c
index
54ae08a
..
5bc2681
100644
(file)
--- a/
src/simix/smx_deployment.c
+++ b/
src/simix/smx_deployment.c
@@
-173,10
+173,10
@@
void SIMIX_function_register_default(xbt_main_func_t code)
*/
xbt_main_func_t SIMIX_get_registered_function(const char *name)
{
*/
xbt_main_func_t SIMIX_get_registered_function(const char *name)
{
+ xbt_main_func_t res = NULL;
xbt_assert0(simix_global,
"SIMIX_global_init has to be called before SIMIX_get_registered_function.");
xbt_assert0(simix_global,
"SIMIX_global_init has to be called before SIMIX_get_registered_function.");
- xbt_main_func_t res =
- xbt_dict_get_or_null(simix_global->registered_functions, name);
+ res = xbt_dict_get_or_null(simix_global->registered_functions, name);
return res ? res : default_function;
}
return res ? res : default_function;
}