Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Stupid me. I hadn't noticed the xbt_dict_get_or_null function...
[simgrid.git] / src / xbt / dict.c
index 1327951..37bc175 100644 (file)
@@ -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);
 }
 
 /**