[epiphany] Remove an unnecessary g_strv_length()



commit 522d846720dce36821f9203b225613518744e4db
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Fri Jun 3 16:11:53 2011 +0300

    Remove an unnecessary g_strv_length()

 lib/ephy-request-about.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/lib/ephy-request-about.c b/lib/ephy-request-about.c
index 167f2ec..5cd55b9 100644
--- a/lib/ephy-request-about.c
+++ b/lib/ephy-request-about.c
@@ -95,15 +95,14 @@ ephy_request_about_send (SoupRequest          *request,
 			mime_types = webkit_web_plugin_get_mimetypes (plugin);
 			for (m = mime_types; m; m = m->next) {
 				WebKitWebPluginMIMEType *mime_type = (WebKitWebPluginMIMEType*) m->data;
-				guint extensions_len = g_strv_length (mime_type->extensions);
 				guint i;
 
 				g_string_append_printf (data_str, "<tr><td>%s</td><td>%s</td><td>",
 							mime_type->name, mime_type->description);
 
-				for (i = 0; i < extensions_len; i++)
+				for (i = 0; mime_type->extensions[i] != NULL; i++)
 					g_string_append_printf (data_str, "%s%c", mime_type->extensions[i],
-								i == (extensions_len - 1) ? ' ' : ',');
+								mime_type->extensions[i + 1] ? ',' : ' ');
 
 				g_string_append(data_str, "</td></tr>");
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]