From 69d83be0371cfe4554e8653b1cee5e1e618fb0e8 Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Sun, 2 Nov 1997 19:41:16 +0000 Subject: [PATCH] Correct the definition of CIRCLEQ_EMPTY. It would give a false positive if the queue contained only one element. Submitted by: Greg Ansley --- sys/sys/queue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 7aa6e094bfb..a72ff3d3c26 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 - * $Id: queue.h,v 1.17 1997/08/25 20:21:54 phk Exp $ + * $Id: queue.h,v 1.18 1997/09/21 22:09:20 gibbs Exp $ */ #ifndef _SYS_QUEUE_H_ @@ -389,7 +389,7 @@ struct { \ /* * Circular queue functions. */ -#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (head)->cqh_last) +#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) #define CIRCLEQ_FIRST(head) ((head)->cqh_first)