[Libosinfo] [PATCH 1/2] test-isodetect: replace while loop with for loop
Věra Cholasta
vbudikov at redhat.com
Wed Oct 17 17:22:59 UTC 2018
---
tests/test-isodetect.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/test-isodetect.c b/tests/test-isodetect.c
index 76f0c5a..c1833ae 100644
--- a/tests/test-isodetect.c
+++ b/tests/test-isodetect.c
@@ -390,8 +390,7 @@ static void test_one(const gchar *vendor)
g_assert_nonnull(isos);
- tmp = isos;
- while (tmp) {
+ for (tmp = isos; tmp; tmp = tmp->next) {
struct ISOInfo *info = tmp->data;
gboolean matched = osinfo_db_identify_media(db, info->media);
OsinfoOs *os;
@@ -408,8 +407,6 @@ static void test_one(const gchar *vendor)
g_assert_cmpstr(shortid, ==, info->shortid);
g_object_unref(G_OBJECT(os));
test_langs(info);
-
- tmp = tmp->next;
}
g_list_foreach(isos, (GFunc)free_iso, NULL);
--
1.8.3.1
More information about the Libosinfo
mailing list