From: alegrand Date: Mon, 16 Aug 2010 22:23:47 +0000 (+0000) Subject: Remove stupid "if" that prevents from displaying the help correctly and use die inste... X-Git-Tag: v3_5~662 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3b49826d39607fcaaf7e6d58fe188048e9b19fbd Remove stupid "if" that prevents from displaying the help correctly and use die instead of exit. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8159 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index e55fd87684..021d21804f 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -51,9 +51,8 @@ void routing_model_create(size_t size_of_links, void* loopback) { } fprintf(stderr,"Routing model %s not found. Existing models:\n",wanted); for (cpt=0;models[cpt].name;cpt++) - if (!strcmp(wanted,models[cpt].name)) - fprintf(stderr," %s: %s\n",models[cpt].name,models[cpt].desc); - exit(1); + fprintf(stderr," %s: %s\n",models[cpt].name,models[cpt].desc); + xbt_die("Invalid model."); } /* ************************************************************************** */