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
today is doomsday: platform.xml is sacrificed for the greater good
[simgrid.git]
/
examples
/
msg
/
actions-storage
/
actions-storage.c
diff --git
a/examples/msg/actions-storage/actions-storage.c
b/examples/msg/actions-storage/actions-storage.c
index
2be369d
..
d975652
100644
(file)
--- a/
examples/msg/actions-storage/actions-storage.c
+++ b/
examples/msg/actions-storage/actions-storage.c
@@
-30,7
+30,7
@@
static msg_file_t get_file_descriptor(const char *file_name){
char full_name[1024];
msg_file_t file = NULL;
char full_name[1024];
msg_file_t file = NULL;
- s
printf(full_name
, "%s:%s", MSG_process_get_name(MSG_process_self()), file_name);
+ s
nprintf(full_name,1023
, "%s:%s", MSG_process_get_name(MSG_process_self()), file_name);
file = (msg_file_t) xbt_dict_get_or_null(opened_files, full_name);
return file;
file = (msg_file_t) xbt_dict_get_or_null(opened_files, full_name);
return file;
@@
-52,7
+52,7
@@
static void action_open(const char *const *action) {
msg_file_t file = NULL;
double clock = MSG_get_clock();
msg_file_t file = NULL;
double clock = MSG_get_clock();
- s
printf(full_name
, "%s:%s", MSG_process_get_name(MSG_process_self()), file_name);
+ s
nprintf(full_name,1023
, "%s:%s", MSG_process_get_name(MSG_process_self()), file_name);
ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
file = MSG_file_open(file_name, NULL);
ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
file = MSG_file_open(file_name, NULL);
@@
-111,7
+111,7
@@
int main(int argc, char *argv[]) {
xbt_replay_action_register("read", action_read);
xbt_replay_action_register("close", action_close);
xbt_replay_action_register("read", action_read);
xbt_replay_action_register("close", action_close);
- if (
!opened_files
)
+ if (
opened_files == NULL
)
opened_files = xbt_dict_new_homogeneous(NULL);
/* Actually do the simulation using MSG_action_trace_run */
res = MSG_action_trace_run(argv[3]); // it's ok to pass a NULL argument here
opened_files = xbt_dict_new_homogeneous(NULL);
/* Actually do the simulation using MSG_action_trace_run */
res = MSG_action_trace_run(argv[3]); // it's ok to pass a NULL argument here