Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bugfix: I inverted the semantic of xbt_dict_get_or_null_ext and xbt_dict_get_ext...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 16 Sep 2008 12:50:18 +0000 (12:50 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 16 Sep 2008 12:50:18 +0000 (12:50 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5937 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/dict.c

index 4bd519b..f116e5a 100644 (file)
@@ -320,7 +320,7 @@ void *xbt_dict_get_ext(xbt_dict_t dict,
   }
 
   if (current == NULL)
-    return NULL;
+    THROW2(not_found_error, 0, "key %.*s not found", key_len, key);
 
   return current->content;
 }
@@ -341,7 +341,7 @@ void *xbt_dict_get_or_null_ext(xbt_dict_t dict,
   }
 
   if (current == NULL)
-    THROW2(not_found_error, 0, "key %.*s not found", key_len, key);
+    return NULL;
 
   return current->content;
 }