diff options
author | 2000-06-17 14:34:04 +0000 | |
---|---|---|
committer | 2000-06-17 14:34:04 +0000 | |
commit | 18e775c1a72dac32f0c0593a6e8b9c2c7a6a48cf (patch) | |
tree | b29512a3844318331929c616a036dc78b282c6fd /usr.bin/make/lst.lib/lstDeQueue.c | |
parent | take MIN/MAX from param.h, okay theo@ (diff) | |
download | wireguard-openbsd-18e775c1a72dac32f0c0593a6e8b9c2c7a6a48cf.tar.xz wireguard-openbsd-18e775c1a72dac32f0c0593a6e8b9c2c7a6a48cf.zip |
This patch moves the definition of lists and list nodes to lst.h.
C is not well-suited for opaque data structures.
Then it proceeds by removing a lot of non-sensical casts and white space.
There are two motivations behind this change:
* small functions like Lst_First can now be redefined as macros safely
(otherwise, the cast would mean that you might write Lst_First(5) and
find out about it rather late)
* the size of the Lst data structure is exposed to user code. This will
be used to allocate lists statically, instead of malloc/free them like
crazy.
Diffstat (limited to 'usr.bin/make/lst.lib/lstDeQueue.c')
-rw-r--r-- | usr.bin/make/lst.lib/lstDeQueue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/lst.lib/lstDeQueue.c b/usr.bin/make/lst.lib/lstDeQueue.c index a0f87b25e2f..1389c411bb6 100644 --- a/usr.bin/make/lst.lib/lstDeQueue.c +++ b/usr.bin/make/lst.lib/lstDeQueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lstDeQueue.c,v 1.8 2000/06/10 01:41:06 espie Exp $ */ +/* $OpenBSD: lstDeQueue.c,v 1.9 2000/06/17 14:34:07 espie Exp $ */ /* $NetBSD: lstDeQueue.c,v 1.5 1996/11/06 17:59:36 christos Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)lstDeQueue.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.8 2000/06/10 01:41:06 espie Exp $"; +static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.9 2000/06/17 14:34:07 espie Exp $"; #endif #endif /* not lint */ @@ -77,7 +77,7 @@ Lst_DeQueue(l) if (tln == NULL) return NULL; - rd = ((ListNode)tln)->datum; + rd = tln->datum; Lst_Remove(l, tln); return rd; } |