X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8cd2898d714fc6bc34076279b5ee1bb55a385b4a..120a17a595bd3d7636a031ddaa5dc372826dba66:/examples/smpi/replay_multiple/replay_multiple.c diff --git a/examples/smpi/replay_multiple/replay_multiple.c b/examples/smpi/replay_multiple/replay_multiple.c index b1330c4670..4c064df958 100644 --- a/examples/smpi/replay_multiple/replay_multiple.c +++ b/examples/smpi/replay_multiple/replay_multiple.c @@ -29,12 +29,11 @@ int main(int argc, char *argv[]){ FILE* fp = fopen(argv[1], "r"); if (fp == NULL) xbt_die("Cannot open %s", argv[1]); - ssize_t read; - char *line = NULL; + char *line = NULL; size_t n = 0; int instance_size = 0; const char* instance_id = NULL; - while ((read = xbt_getline(&line, &n, fp)) != -1 ){ + while (xbt_getline(&line, &n, fp) != -1 ){ xbt_dynar_t elems = xbt_str_split_quoted_in_place(line); if(xbt_dynar_length(elems)<3){ xbt_die ("Not enough elements in the line"); @@ -49,6 +48,7 @@ int main(int argc, char *argv[]){ xbt_free(line_char); } + xbt_free(line); fclose(fp);