X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ba25a27159fa0691d1f977863538727584bb5a7a..c8d813c5dd9d73334cd249e22648a950418b51f7:/tools/tesh/tesh.c diff --git a/tools/tesh/tesh.c b/tools/tesh/tesh.c index 7c1acc90d1..f865e45fb4 100644 --- a/tools/tesh/tesh.c +++ b/tools/tesh/tesh.c @@ -183,12 +183,12 @@ static void parse_environ() int i; char *eq = NULL; char *key = NULL; - env = xbt_dict_new(); + env = xbt_dict_new_homogeneous(xbt_free_f); for (i = 0; environ[i]; i++) { p = environ[i]; eq = strchr(p, '='); key = bprintf("%.*s", (int) (eq - p), p); - xbt_dict_set(env, key, xbt_strdup(eq + 1), xbt_free_f); + xbt_dict_set(env, key, xbt_strdup(eq + 1), NULL); free(key); } } @@ -234,7 +234,7 @@ int main(int argc, char *argv[]) char *eq = strchr(argv[i+1], '='); xbt_assert(eq,"The argument of --setenv must contain a '=' (got %s instead)",argv[i+1]); char *key = bprintf("%.*s", (int) (eq - argv[i+1]), argv[i+1]); - xbt_dict_set(env, key, xbt_strdup(eq + 1), xbt_free_f); + xbt_dict_set(env, key, xbt_strdup(eq + 1), NULL); XBT_INFO("setting environment variable '%s' to '%s'", key, eq+1); free(key); memmove(argv + i, argv + i + 2, (argc - i - 1) * sizeof(char *));