X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0f5e8daaa6e9f74521068aa75837200bcd182ea6..c978b9fe22c4e00793169fbe9d5f22825b96f894:/src/include/surf/surf_resource.h diff --git a/src/include/surf/surf_resource.h b/src/include/surf/surf_resource.h index 625fd9ff9e..e9c78c0c9f 100644 --- a/src/include/surf/surf_resource.h +++ b/src/include/surf/surf_resource.h @@ -9,14 +9,14 @@ #ifndef SURF_RESOURCE_H #define SURF_RESOURCE_H -static XBT_INLINE +/*FIXME:DELETEstatic XBT_INLINE surf_resource_t surf_resource_new(size_t childsize, - surf_model_t model, char *name, + surf_model_t model, const char *name, xbt_dict_t props) { surf_resource_t res = xbt_malloc0(childsize); res->model = model; - res->name = name; + res->name = xbt_strdup(name); res->properties = props; return res; } @@ -24,10 +24,8 @@ static XBT_INLINE 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); } @@ -39,6 +37,6 @@ static XBT_INLINE const char *surf_resource_name(const void *resource) static XBT_INLINE xbt_dict_t surf_resource_properties(const void *resource) { return ((surf_resource_t) resource)->properties; -} +}*/ #endif /* SURF_RESOURCE_H */