*/
void SIMIX_launch_application(const char *file)
{
+ int parse_status;
xbt_assert0(simix_global,
"SIMIX_global_init has to be called before SIMIX_launch_application.");
surf_parse_reset_parser();
surfxml_add_callback(ETag_surfxml_process_cb_list, parse_process_finalize);
surf_parse_open(file);
- xbt_assert1((!surf_parse()), "Parse error in %s", file);
+ parse_status = surf_parse();
surf_parse_close();
+ xbt_assert1(!parse_status, "Parse error in %s", file);
}
/**
*/
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_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;
}