Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This commit breaks the simgrid-java execution; Revert "Avoid unnecessary loop."
[simgrid.git] / src / include / surf / surf_resource.h
index d0a14d5..aa72c4c 100644 (file)
@@ -20,14 +20,27 @@ static XBT_INLINE
   res->properties = props;
   return res;
 }
+static XBT_INLINE void routing_storage_type_free(void *r)
+{
+  storage_type_t stype = r;
+  free(stype->model);
+  free(stype->type_id);
+  xbt_dict_free(&(stype->properties));
+  xbt_dict_free(&(stype->content));
+  free(stype);
+}
+
+static XBT_INLINE void routing_storage_host_free(void *r)
+{
+  xbt_dynar_t dyn = r;
+  xbt_dynar_free(&dyn);
+}
 
 static XBT_INLINE void surf_resource_free(void *r)
 {
   surf_resource_t resource = r;
-  if (resource->name)
-    free(resource->name);
-  if (resource->properties)
-    xbt_dict_free(&resource->properties);
+  free(resource->name);
+  xbt_dict_free(&resource->properties);
   free(resource);
 }