From 5f550c85c4d2308a15f49f4d2d975b0614867412 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Thu, 18 Dec 2008 12:47:41 -0500 Subject: using list_head to handle the list git-svn-id: http://opkg.googlecode.com/svn/trunk@185 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/pkg_extract.c') diff --git a/libopkg/pkg_extract.c b/libopkg/pkg_extract.c index f972182..eae7746 100644 --- a/libopkg/pkg_extract.c +++ b/libopkg/pkg_extract.c @@ -102,8 +102,8 @@ int pkg_extract_data_file_names_to_file(pkg_t *pkg, const char *file_name) tmp = tmpfile(); if (pkg->installed_files) { str_list_elt_t *elt; - for (elt = pkg->installed_files->head; elt; elt = elt->next) { - fprintf(file, "%s\n", elt->data); + for (elt = str_list_first(pkg->installed_files); elt; elt = str_list_next(pkg->installed_files, elt)) { + fprintf(file, "%s\n", (char *)elt->data); } } else { err = pkg_extract_data_file_names_to_stream(pkg, tmp); -- cgit v0.9.1