build: missing pkg.m4
[project/opkg-lede.git] / libopkg / void_list.c
index cc4d25142ac2a77ce65c57bcf69908877e44e931..4c9d8971f402ef52b8f3e48ba19f93488ed6ba26 100644 (file)
@@ -15,9 +15,6 @@
    General Public License for more details.
 */
 
-#include "includes.h"
-#include <errno.h>
-
 #include "void_list.h"
 #include "libbb/libbb.h"
 
@@ -27,7 +24,7 @@ void void_list_elt_init(void_list_elt_t *elt, void *data)
     elt->data = data;
 }
 
-void_list_elt_t * void_list_elt_new (void *data) {
+static void_list_elt_t * void_list_elt_new (void *data) {
     void_list_elt_t *elt;
     /* freed in void_list_elt_deinit */
     elt = xcalloc(1, sizeof(void_list_elt_t));
@@ -74,7 +71,7 @@ void_list_elt_t *void_list_pop(void_list_t *list)
 {
     struct list_head *node;
 
-    if (void_list_empty(list)) 
+    if (void_list_empty(list))
         return NULL;
     node = list->head.next;
     list_del_init(node);
@@ -97,7 +94,7 @@ void *void_list_remove(void_list_t *list, void_list_elt_t **iter)
             break;
     }
     if ( pos != old_elt) {
-        fprintf(stderr, "%s: ERROR: element not found in list\n", __FUNCTION__);
+        opkg_msg(ERROR, "Internal error: element not found in list.\n");
         return NULL;
     }