From 14c1a28fbdd2bde4f727adfbd4745cc60995c8a3 Mon Sep 17 00:00:00 2001 From: alegrand Date: Thu, 25 Aug 2005 23:36:15 +0000 Subject: [PATCH] Stupid me. I hadn't noticed the xbt_dict_get_or_null function... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1665 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/msg/deployment.c | 4 ++-- src/xbt/dict.c | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/msg/deployment.c b/src/msg/deployment.c index eacb7fef92..8668832022 100644 --- a/src/msg/deployment.c +++ b/src/msg/deployment.c @@ -123,8 +123,8 @@ m_process_code_t MSG_get_registered_function(const char *name) m_process_code_t code = NULL; xbt_assert0(msg_global,"MSG_global_init has to be called before MSG_get_registered_function."); - - code = xbt_dict_get(msg_global->registered_functions,name); + + code = xbt_dict_get_or_null(msg_global->registered_functions,name); return code; } diff --git a/src/xbt/dict.c b/src/xbt/dict.c index 1327951c25..37bc17511d 100644 --- a/src/xbt/dict.c +++ b/src/xbt/dict.c @@ -128,18 +128,9 @@ xbt_dict_get_ext(xbt_dict_t dict, void * xbt_dict_get(xbt_dict_t dict, const char *key) { - xbt_ex_t e; xbt_assert(dict); - TRY { - return xbt_dictelm_get(dict->head, key); - } CATCH(e) { - if(e.category==not_found_error) { - return NULL; - } - RETHROW; - } - return NULL; + return xbt_dictelm_get(dict->head, key); } /** -- 2.20.1