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
remove a couple of dumb sprintf
[simgrid.git]
/
teshsuite
/
msg
/
host_on_off
/
host_on_off.c
diff --git
a/teshsuite/msg/host_on_off/host_on_off.c
b/teshsuite/msg/host_on_off/host_on_off.c
index
fe7a4fd
..
fcb42c6
100644
(file)
--- a/
teshsuite/msg/host_on_off/host_on_off.c
+++ b/
teshsuite/msg/host_on_off/host_on_off.c
@@
-13,9
+13,7
@@
static int slave(int argc, char *argv[])
msg_task_t task = NULL;
XBT_ATTRIB_UNUSED int res;
int id = -1;
msg_task_t task = NULL;
XBT_ATTRIB_UNUSED int res;
int id = -1;
- char mailbox[80];
-
- sprintf(mailbox, "jupi");
+ const char * mailbox = "jupi";
while (1) {
res = MSG_task_receive(&(task), mailbox);
while (1) {
res = MSG_task_receive(&(task), mailbox);
@@
-41,10
+39,9
@@
static int master(int argc, char *argv[])
double task_comp_size = 5E7;
double task_comm_size = 1E6;
double task_comp_size = 5E7;
double task_comm_size = 1E6;
- c
har mailbox[256]
;
+ c
onst char * mailbox = "jupi"
;
msg_task_t task = NULL;
msg_host_t jupiter = MSG_host_by_name("Jupiter");
msg_task_t task = NULL;
msg_host_t jupiter = MSG_host_by_name("Jupiter");
- sprintf(mailbox, "jupi");
task = MSG_task_create("task on", task_comp_size, task_comm_size, NULL);
XBT_INFO("Sending \"%s\"", task->name);
task = MSG_task_create("task on", task_comp_size, task_comm_size, NULL);
XBT_INFO("Sending \"%s\"", task->name);