diff options
author | Nathan Angelacos <nangel@alpinelinux.org> | 2008-06-02 01:02:24 +0000 |
---|---|---|
committer | Nathan Angelacos <nangel@alpinelinux.org> | 2008-06-02 01:02:24 +0000 |
commit | f7ef0f79a30a1390d6d27f2d90c84505a8d95a7b (patch) | |
tree | f1bdf72b80072fafdeb3aaa80dec24f42a2a14b1 /src | |
parent | 7bafb94dca6393a48f774e987870f91f9fd82d73 (diff) | |
download | haserl-f7ef0f79a30a1390d6d27f2d90c84505a8d95a7b.tar.bz2 haserl-f7ef0f79a30a1390d6d27f2d90c84505a8d95a7b.tar.xz |
ulist api unit test finished
Diffstat (limited to 'src')
-rw-r--r-- | src/config.h.in | 2 | ||||
-rw-r--r-- | src/llist.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/config.h.in b/src/config.h.in index d406303..215b591 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -99,5 +99,5 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const -/* Define to `unsigned' if <sys/types.h> does not define. */ +/* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t diff --git a/src/llist.c b/src/llist.c index 00a9762..53295c5 100644 --- a/src/llist.c +++ b/src/llist.c @@ -4,7 +4,7 @@ #include <stdlib.h> -/* #include "xmalloc.h" */ +#include "xmalloc.h" #include "llist.h" /* @@ -17,7 +17,7 @@ typedef struct llist_t { void llist_add_to(llist_t ** old_head, void *data) { - llist_t *new = xmalloc(sizeof(llist_t)); + llist_t *new = xmalloc(sizeof(llist_t)); new->data = data; new->link = *old_head; @@ -71,7 +71,7 @@ llist_unlink(llist_t ** head, llist_t * elm) return; } while (this->link) { - if (this == elm) { + if (this->link == elm) { this->link = elm->link; return; } |