X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ff8cc1407a3ae6159a92caa86472cb669062f3bb..41ec02708cdd5e0f2b478a9f5135a597353a72e8:/src/instr/instr_paje_types.cpp diff --git a/src/instr/instr_paje_types.cpp b/src/instr/instr_paje_types.cpp index 494ef42947..792fc4ce5e 100644 --- a/src/instr/instr_paje_types.cpp +++ b/src/instr/instr_paje_types.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2014-2015. The SimGrid Team. +/* Copyright (c) 2012, 2014-2017. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -52,9 +52,6 @@ void PJ_type_free (type_t type) xbt_dict_cursor_t cursor = nullptr; xbt_dict_foreach (type->values, cursor, value_name, val) { XBT_DEBUG("free value %s, child of %s", val->name, val->father->name); - xbt_free(val->name); - xbt_free(val->color); - xbt_free(val->id); xbt_free(val); } xbt_dict_free (&type->values); @@ -115,14 +112,10 @@ type_t PJ_type_container_new (const char *name, type_t father) THROWF (tracing_error, 0, "can't create a container type with a nullptr name"); } - type_t ret = nullptr; - - ret = newType (name, name, nullptr, TYPE_CONTAINER, father); - if (father == nullptr){ + type_t ret = newType(name, name, nullptr, TYPE_CONTAINER, father); + if (father == nullptr) { rootType = ret; - } - - if(father){ + } else { XBT_DEBUG("ContainerType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id); DefineContainerEvent(ret); } @@ -149,8 +142,8 @@ type_t PJ_type_variable_new (const char *name, const char *color, type_t father) type_t ret = nullptr; - char white[INSTR_DEFAULT_STR_SIZE] = "1 1 1"; if (not color) { + char white[INSTR_DEFAULT_STR_SIZE] = "1 1 1"; ret = newType (name, name, white, TYPE_VARIABLE, father); }else{ ret = newType (name, name, color, TYPE_VARIABLE, father);