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
Check return value of (v)asprintf.
[simgrid.git]
/
examples
/
gras
/
p2p
/
chord
/
chord.c
diff --git
a/examples/gras/p2p/chord/chord.c
b/examples/gras/p2p/chord/chord.c
index
debf98f
..
f70b5ce
100644
(file)
--- a/
examples/gras/p2p/chord/chord.c
+++ b/
examples/gras/p2p/chord/chord.c
@@
-312,7
+312,7
@@
int node(int argc, char **argv)
if (argc == 3) {
create = 1;
} else {
-
asprintf(&other_host, "%s",
argv[3]);
+
other_host = xbt_strdup(
argv[3]);
other_port = atoi(argv[4]);
}