فهرست منبع

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 سال پیش
والد
کامیت
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);
 }