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
Show also the sub-scheduling rounds.
[simgrid.git]
/
src
/
xbt
/
xbt_queue.c
diff --git
a/src/xbt/xbt_queue.c
b/src/xbt/xbt_queue.c
index
b3829bd
..
679160c
100644
(file)
--- a/
src/xbt/xbt_queue.c
+++ b/
src/xbt/xbt_queue.c
@@
-33,7
+33,8
@@
typedef struct s_xbt_queue_ {
xbt_queue_t xbt_queue_new(int capacity, unsigned long elm_size)
{
xbt_queue_t res = xbt_new0(s_xbt_queue_t, 1);
xbt_queue_t xbt_queue_new(int capacity, unsigned long elm_size)
{
xbt_queue_t res = xbt_new0(s_xbt_queue_t, 1);
- xbt_assert0(capacity >= 0, "Capacity cannot be negative");
+ if (capacity<0)
+ capacity=0;
res->capacity = capacity;
res->data = xbt_dynar_new(elm_size, NULL);
res->capacity = capacity;
res->data = xbt_dynar_new(elm_size, NULL);