Merge commit 'grg' into HEAD
[oweals/opkg-lede.git] / libopkg / void_list.c
index cc4d25142ac2a77ce65c57bcf69908877e44e931..04066bfa021fcdb31335570b289da44f2cc30ece 100644 (file)
@@ -16,7 +16,6 @@
 */
 
 #include "includes.h"
-#include <errno.h>
 
 #include "void_list.h"
 #include "libbb/libbb.h"
@@ -27,7 +26,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));
@@ -97,7 +96,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;
     }