Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reorganize mallocator.c, and add the possibility to disable mallocators.
[simgrid.git] / src / xbt / dict_cursor.c
index f21c221..6d7f277 100644 (file)
@@ -51,10 +51,8 @@ XBT_INLINE xbt_dict_cursor_t xbt_dict_cursor_new(const xbt_dict_t dict)
  */
 XBT_INLINE void xbt_dict_cursor_free(xbt_dict_cursor_t * cursor)
 {
-  if (*cursor) {
-    xbt_free(*cursor);
-    *cursor = NULL;
-  }
+  xbt_free(*cursor);
+  *cursor = NULL;
 }
 
 /*
@@ -62,7 +60,7 @@ XBT_INLINE void xbt_dict_cursor_free(xbt_dict_cursor_t * cursor)
  */
 static XBT_INLINE void __cursor_not_null(xbt_dict_cursor_t cursor)
 {
-  xbt_assert0(cursor, "Null cursor");
+  xbt_assert(cursor, "Null cursor");
 }