X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=safe_list.c;h=16f57e084f4bb7dd59afee1366191f5d069a0fec;hp=f26b4dd11d7f2b591210092c7dfd1fec33cccf8a;hb=HEAD;hpb=316e3fb6c28ab3a2244d059fc3b9429df8cc9f0a;ds=sidebyside diff --git a/safe_list.c b/safe_list.c index f26b4dd..16f57e0 100644 --- a/safe_list.c +++ b/safe_list.c @@ -86,6 +86,12 @@ void safe_list_add(struct safe_list *list, struct safe_list *head) list_add_tail(&list->list, &head->list); } +void safe_list_add_first(struct safe_list *list, struct safe_list *head) +{ + list->i = NULL; + list_add(&list->list, &head->list); +} + void safe_list_del(struct safe_list *list) { struct safe_list_iterator *i, *next_i, **tail;