From 3b49826d39607fcaaf7e6d58fe188048e9b19fbd Mon Sep 17 00:00:00 2001 From: alegrand Date: Mon, 16 Aug 2010 22:23:47 +0000 Subject: [PATCH] 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 --- src/surf/surf_routing.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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."); } /* ************************************************************************** */ -- 2.20.1