A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[surf] new (abstract) class: PropertyHolder, with only one purpose
[simgrid.git]
/
src
/
surf
/
trace_mgr.c
diff --git
a/src/surf/trace_mgr.c
b/src/surf/trace_mgr.c
index
3ce034e
..
2f0478f
100644
(file)
--- a/
src/surf/trace_mgr.c
+++ b/
src/surf/trace_mgr.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2004-2005, 2007, 2009-201
3
. The SimGrid Team.
+/* Copyright (c) 2004-2005, 2007, 2009-201
4
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-269,7
+269,7
@@
tmgr_trace_t tmgr_trace_new_from_string(const char *id, const char *input,
}
xbt_assert(periodicity >= 0,
}
xbt_assert(periodicity >= 0,
- "Invalid periodicity %
l
g (must be positive)", periodicity);
+ "Invalid periodicity %g (must be positive)", periodicity);
trace = xbt_new0(s_tmgr_trace_t, 1);
trace->type = e_trace_list;
trace = xbt_new0(s_tmgr_trace_t, 1);
trace->type = e_trace_list;
@@
-292,7
+292,7
@@
tmgr_trace_t tmgr_trace_new_from_string(const char *id, const char *input,
if (last_event) {
if (last_event->delta > event.delta) {
xbt_die("%s:%d: Invalid trace: Events must be sorted, "
if (last_event) {
if (last_event->delta > event.delta) {
xbt_die("%s:%d: Invalid trace: Events must be sorted, "
- "but time %
lg > time %l
g.\n%s",
+ "but time %
g > time %
g.\n%s",
id, linecount, last_event->delta, event.delta, input);
}
last_event->delta = event.delta - last_event->delta;
id, linecount, last_event->delta, event.delta, input);
}
last_event->delta = event.delta - last_event->delta;
@@
-339,8
+339,9
@@
tmgr_trace_t tmgr_trace_new_from_file(const char *filename)
}
f = surf_fopen(filename, "r");
}
f = surf_fopen(filename, "r");
- xbt_assert(f != NULL, "Cannot open file '%s' (path=%s)", filename,
- xbt_str_join(surf_path, ":"));
+ if (f == NULL)
+ xbt_die("Cannot open file '%s' (path=%s)", filename,
+ xbt_str_join(surf_path, ":"));
tstr = xbt_str_from_file(f);
fclose(f);
tstr = xbt_str_from_file(f);
fclose(f);