- char *last=strrchr(argv[2],'.');
-
- char *filename=bprintf("%.*s.trace",last==NULL?strlen(argv[2]):last-argv[2],argv[2]);
- INFO1("Producing the trace of the run into %s",filename);
- FILE*out = fopen(filename,"w");
- xbt_assert1(out,"Cannot write to %s",filename);
- free(filename);
+ INFO1("Producing the trace of the run into %s",tracefilename);
+ FILE*out = fopen(tracefilename,"w");
+ xbt_assert1(out,"Cannot write to %s",tracefilename);
+ free(tracefilename);