From: mquinson Date: Fri, 11 Feb 2005 14:31:54 +0000 (+0000) Subject: get rid of the nasty TRYCLEAN X-Git-Tag: v3.3~4373 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ffb6b3fc6c9b2b1a1032e4de24cb0c9c2aba19b4 get rid of the nasty TRYCLEAN git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@978 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/config.c b/src/xbt/config.c index 1de8868927..39bde111d9 100644 --- a/src/xbt/config.c +++ b/src/xbt/config.c @@ -609,8 +609,11 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) { switch (cell->type) { case xbt_cfgelm_string: - TRYCLEAN(xbt_cfg_set_string(cfg, name, val), - xbt_free(optionlist_cpy)); + errcode = xbt_cfg_set_string(cfg, name, val); + if (errcode != no_error) { + xbt_free(optionlist_cpy); + return errcode; + } break; case xbt_cfgelm_int: @@ -622,8 +625,11 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) { name); } - TRYCLEAN(xbt_cfg_set_int(cfg,name,i), - xbt_free(optionlist_cpy)); + errcode = xbt_cfg_set_int(cfg,name,i); + if (errcode != no_error) { + xbt_free(optionlist_cpy); + return errcode; + } break; case xbt_cfgelm_double: @@ -635,8 +641,11 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) { name); } - TRYCLEAN(xbt_cfg_set_double(cfg,name,d), - xbt_free(optionlist_cpy)); + errcode = xbt_cfg_set_double(cfg,name,d); + if (errcode != no_error) { + xbt_free(optionlist_cpy); + return errcode; + } break; case xbt_cfgelm_host: @@ -658,8 +667,11 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) { name); } - TRYCLEAN(xbt_cfg_set_host(cfg,name,str,i), - xbt_free(optionlist_cpy)); + errcode = xbt_cfg_set_host(cfg,name,str,i); + if (errcode != no_error) { + xbt_free(optionlist_cpy); + return errcode; + } break; default: