Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Useless cleanup
[simgrid.git] / src / xbt / dict_elm.c
index 1c7b2fb..3652ec1 100644 (file)
@@ -211,7 +211,9 @@ gras_dictelm_free(gras_dictelm_t **pp_elm)  {
 static
 void
 _dictelm_wrapper_free(void *pp_elm) {
-  DEBUG2("Free dictelm %p (*=%p)", pp_elm, *(void**)pp_elm);
+  DEBUG3("Free dictelm '%.*s' %p", 
+        (*(gras_dictelm_t**)pp_elm)->key_len, (*(gras_dictelm_t**)pp_elm)->key,
+        *(void**)pp_elm);
   gras_dictelm_free((gras_dictelm_t**)pp_elm);
 }
 
@@ -641,12 +643,11 @@ gras_dictelm_set(gras_dictelm_t **pp_head,
 static 
 gras_error_t
 _gras_dictelm_get_rec(gras_dictelm_t *p_head,
-                          const char     *key,
-                          int             key_len,
-                          int             offset,
-                          /* OUT */void **data) {
-
-  gras_error_t errcode = no_error;
+                     const char     *key,
+                     int             key_len,
+                     int             offset,
+                     void **data) {
+  void *res;
 
   CDEBUG3(dict_search, "Search %.*s in %p", key_len, key, p_head); 
 
@@ -656,7 +657,7 @@ _gras_dictelm_get_rec(gras_dictelm_t *p_head,
   if (offset >= key_len) {
     *data = p_head->content;
 
-    return errcode;
+    return no_error;
   }
 
   {
@@ -680,7 +681,7 @@ _gras_dictelm_get_rec(gras_dictelm_t *p_head,
         gras_dynar_get(p_head->sub, pos, &p_child);
         *data = p_child->content;
 
-        return errcode;
+        return no_error;
       }
 
     case 2: /* A child constitutes a prefix of the key => recurse */