From 0cdbf04e9c6f953beb6b8a7badd015a3b0a793b0 Mon Sep 17 00:00:00 2001 From: neal Date: Sun, 22 Jun 2008 09:41:00 +0000 Subject: 2008-06-22 Neal H. Walfield * list.h (list_count) [! NDEBUG]: Don't check the length of the list in this case... [! NCHECK]: ... but in this case. --- viengoos/ChangeLog | 6 ++++++ viengoos/list.h | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'viengoos') diff --git a/viengoos/ChangeLog b/viengoos/ChangeLog index 7561726..f462414 100644 --- a/viengoos/ChangeLog +++ b/viengoos/ChangeLog @@ -1,3 +1,9 @@ +2008-06-22 Neal H. Walfield + + * list.h (list_count) [! NDEBUG]: Don't check the length of the + list in this case... + [! NCHECK]: ... but in this case. + 2008-06-22 Neal H. Walfield * server.c (server_loop): In the implementation of diff --git a/viengoos/list.h b/viengoos/list.h index 16d8c98..488e1f5 100644 --- a/viengoos/list.h +++ b/viengoos/list.h @@ -122,7 +122,7 @@ list_prev (struct list_node *node) static inline int list_count (struct list *list) { -#ifndef NDEBUG +#ifndef NCHECK int count = 0; struct list_node *node; for (node = list_head (list); node; node = list_next (node)) @@ -313,10 +313,8 @@ list_unlink (struct list *list, struct list_node *item) static inline void list_move (struct list *target, struct list *source) { -#ifndef NDEBUG assert (! target->head); assert (target->count == 0); -#endif *target = *source; @@ -364,7 +362,7 @@ list_join (struct list *target, struct list *source) struct foo { ...; - struct list_node *node; + struct list_node node; } LIST_CLASS(foo, struct foo, node, true) -- cgit v1.2.3