Просмотр исходного кода

This fixes an off by one in queue_avail which resulted in an assertion during testing.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@798 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 20 лет назад
Родитель
Сommit
0e50278a32
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      include/queue.h

+ 1 - 1
include/queue.h

@@ -164,7 +164,7 @@ static inline int queue_item_iterator_next (struct queue *queue)
 
 static inline void queue_avail (struct queue *queue, int *avail)
 {
-	*avail = queue->size - queue->used - 1;
+	*avail = queue->size - queue->used - 2;
 	assert (*avail >= 0);
 }