소스 검색

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);
 }