]> git.ozlabs.org Git - ccan/blobdiff - list/list.c
Move modules to ccan/ tools to tools/
[ccan] / list / list.c
diff --git a/list/list.c b/list/list.c
deleted file mode 100644 (file)
index b72f8f6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include "list/list.h"
-
-struct list_head *list_check(struct list_head *h, const char *abortstr)
-{
-       struct list_node *n, *p;
-       int count = 0;
-
-       if (h->n.next == &h->n) {
-               if (h->n.prev != &h->n) {
-                       if (!abortstr)
-                               return NULL;
-                       fprintf(stderr, "%s: prev corrupt in empty %p\n",
-                               abortstr, h);
-                       abort();
-               }
-               return h;
-       }
-
-       for (p = &h->n, n = h->n.next; n != &h->n; p = n, n = n->next) {
-               count++;
-               if (n->prev != p) {
-                       if (!abortstr)
-                               return NULL;
-                       fprintf(stderr,
-                               "%s: prev corrupt in node %p (%u) of %p\n",
-                               abortstr, n, count, h);
-                       abort();
-               }
-       }
-       return h;
-}