diff options
author | will <will@FreeBSD.org> | 2000-12-02 18:58:01 +0000 |
---|---|---|
committer | will <will@FreeBSD.org> | 2000-12-02 18:58:01 +0000 |
commit | 797262c9e92824a19005f56e85cd3f19b8273f9b (patch) | |
tree | 7680565ed1402e4003087d01cf0b545aee3b625e /usr.bin/make/lst.lib/lstInt.h | |
parent | d04b66b7bc8243e8d0f41b0ec49287b046f7896c (diff) | |
download | FreeBSD-src-797262c9e92824a19005f56e85cd3f19b8273f9b.zip FreeBSD-src-797262c9e92824a19005f56e85cd3f19b8273f9b.tar.gz |
There's no reason to use fancy forms of NULL. Replace all instances
of NIL, NILLST, NILLGNODE, etc. with NULL.
Obtained from: OpenBSD
Diffstat (limited to 'usr.bin/make/lst.lib/lstInt.h')
-rw-r--r-- | usr.bin/make/lst.lib/lstInt.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/make/lst.lib/lstInt.h b/usr.bin/make/lst.lib/lstInt.h index 0e28740..6bbc240 100644 --- a/usr.bin/make/lst.lib/lstInt.h +++ b/usr.bin/make/lst.lib/lstInt.h @@ -61,8 +61,6 @@ typedef struct ListNode { */ #define LN_DELETED 0x0001 /* List node should be removed when done */ -#define NilListNode ((ListNode)-1) - typedef enum { Head, Middle, Tail, Unknown } Where; @@ -77,14 +75,12 @@ typedef struct { */ Where atEnd; /* Where in the list the last access was */ Boolean isOpen; /* true if list has been Lst_Open'ed */ - ListNode curPtr; /* current node, if open. NilListNode if + ListNode curPtr; /* current node, if open. NULL if * *just* opened */ ListNode prevPtr; /* Previous node, if open. Used by * Lst_Remove */ } *List; -#define NilList ((List)-1) - /* * PAlloc (var, ptype) -- * Allocate a pointer-typedef structure 'ptype' into the variable 'var' @@ -95,18 +91,18 @@ typedef struct { * LstValid (l) -- * Return TRUE if the list l is valid */ -#define LstValid(l) (((Lst)l == NILLST) ? FALSE : TRUE) +#define LstValid(l) (((Lst)l == NULL) ? FALSE : TRUE) /* * LstNodeValid (ln, l) -- * Return TRUE if the LstNode ln is valid with respect to l */ -#define LstNodeValid(ln, l) ((((LstNode)ln) == NILLNODE) ? FALSE : TRUE) +#define LstNodeValid(ln, l) ((((LstNode)ln) == NULL) ? FALSE : TRUE) /* * LstIsEmpty (l) -- * TRUE if the list l is empty. */ -#define LstIsEmpty(l) (((List)l)->firstPtr == NilListNode) +#define LstIsEmpty(l) (((List)l)->firstPtr == NULL) #endif /* _LSTINT_H_ */ |