Merge commit 'grg' into HEAD
[oweals/opkg-lede.git] / libopkg / active_list.c
index 6b177c6fe703fca54865932b5246355639297763..ffc6db06c83f5568aaeac1eb853b9cdb244e895e 100644 (file)
@@ -34,7 +34,7 @@ void active_list_init(struct active_list *ptr) {
 struct active_list * active_list_next(struct active_list *head, struct active_list *ptr) {
     struct active_list *next=NULL;
     if ( !head ) {
-        fprintf(stderr, "active_list_next head = %p, ptr = %p invalid value!!\n", head, ptr);
+        opkg_msg(ERROR, "Internal error: head=%p, ptr=%p\n", head, ptr);
         return NULL;
     }
     if ( !ptr )
@@ -56,7 +56,7 @@ struct active_list * active_list_next(struct active_list *head, struct active_li
 struct active_list * active_list_prev(struct active_list *head, struct active_list *ptr) {
     struct active_list *prev=NULL;
     if ( !head ) {
-        fprintf(stderr, "active_list_prev head = %p, ptr = %p invalid value!!\n", head, ptr);
+        opkg_msg(ERROR, "Internal error: head=%p, ptr=%p\n", head, ptr);
         return NULL;
     }
     if ( !ptr )
@@ -119,7 +119,7 @@ void active_list_add(struct active_list *head, struct active_list *node) {
     node->depended  = head;
 }
 
-struct active_list * active_list_head_new() {
+struct active_list * active_list_head_new(void) {
     struct active_list * head = xcalloc(1, sizeof(struct active_list));
     active_list_init(head);
     return head;