Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not request status if not requested by caller.
[simgrid.git] / src / xbt / xbt_queue.c
index b3829bd..679160c 100644 (file)
@@ -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);