From 18fa1d0fa328ab69f60e76be2a9dd94580537c7d Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 19 Jun 2009 03:06:22 +0200 Subject: [PATCH] Use an index to iterate news feeds to avoid compiler warnings --- midori/midori-view.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index b0887bc9..44288fad 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -827,12 +827,13 @@ webkit_web_view_load_finished_cb (WebKitWebView* web_view, "f.push (l[i].href + '|' + l[i].title); } return f; }" "feeds (document.getElementsByTagName ('link'))", NULL); gchar** items = g_strsplit (value, ",", 0); - gchar** iter; + guint i = 0; katze_array_clear (view->news_feeds); - for (iter = items; iter && *iter; iter++) + if (items != NULL) + while (items[i] != NULL) { - gchar** parts = g_strsplit (*iter, "|", 2); + gchar** parts = g_strsplit (items[i], "|", 2); KatzeItem* item = g_object_new (KATZE_TYPE_ITEM, "uri", parts ? *parts : "", "name", parts && *parts ? parts[1] : NULL, @@ -840,6 +841,7 @@ webkit_web_view_load_finished_cb (WebKitWebView* web_view, katze_array_add_item (view->news_feeds, item); g_object_unref (item); g_strfreev (parts); + i++; } g_strfreev (items); g_object_set_data (G_OBJECT (view), "news-feeds", -- 2.39.5