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
Continue parser cleanups
[simgrid.git]
/
src
/
xbt
/
xbt_strbuff.c
diff --git
a/src/xbt/xbt_strbuff.c
b/src/xbt/xbt_strbuff.c
index
a474b3a
..
4af8992
100644
(file)
--- a/
src/xbt/xbt_strbuff.c
+++ b/
src/xbt/xbt_strbuff.c
@@
-78,9
+78,8
@@
void xbt_strbuff_append(xbt_strbuff_t b, const char *toadd)
needed_space = b->used + addlen + 1;
if (needed_space > b->size) {
needed_space = b->used + addlen + 1;
if (needed_space > b->size) {
- b->data =
- realloc(b->data, MAX(minimal_increment + b->used, needed_space));
b->size = MAX(minimal_increment + b->used, needed_space);
b->size = MAX(minimal_increment + b->used, needed_space);
+ b->data = realloc(b->data, b->size);
}
strcpy(b->data + b->used, toadd);
b->used += addlen;
}
strcpy(b->data + b->used, toadd);
b->used += addlen;