-/* $Id$ */
-
-/* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */
+/* Copyright (c) 2004, 2005, 2007, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
}
xbt_dynar_push(trace->event_list, &event);
last_event =
- xbt_dynar_get_ptr(trace->event_list,
- xbt_dynar_length(trace->event_list) - 1);
+ xbt_dynar_get_ptr(trace->event_list,
+ xbt_dynar_length(trace->event_list) - 1);
}
if (last_event)
last_event->delta = periodicity;
tmgr_trace_t tmgr_trace_new(const char *filename)
{
+ char *tstr = NULL;
FILE *f = NULL;
tmgr_trace_t trace = NULL;
}
f = surf_fopen(filename, "r");
- xbt_assert2(f!=NULL, "Cannot open file '%s' (path=%s)", filename,
- xbt_str_join(surf_path,":"));
+ xbt_assert2(f != NULL, "Cannot open file '%s' (path=%s)", filename,
+ xbt_str_join(surf_path, ":"));
- char *tstr = xbt_str_from_file(f);
+ tstr = xbt_str_from_file(f);
fclose(f);
trace = tmgr_trace_new_from_string(filename, tstr, 0.);
xbt_free(tstr);