From cba95b2580780a5924063056d2be528451d6008a Mon Sep 17 00:00:00 2001 From: mquinson Date: Wed, 24 Nov 2010 16:18:48 +0000 Subject: [PATCH] Be less picky about the passed arguments git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8640 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/xbt_queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xbt/xbt_queue.c b/src/xbt/xbt_queue.c index b3829bd59f..679160c5c9 100644 --- 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_assert0(capacity >= 0, "Capacity cannot be negative"); + if (capacity<0) + capacity=0; res->capacity = capacity; res->data = xbt_dynar_new(elm_size, NULL); -- 2.20.1