[libpeas] Don't use g_strv_length()
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Don't use g_strv_length()
- Date: Sat, 20 Dec 2014 17:22:31 +0000 (UTC)
commit 2b6a313d779b3cc05dc26cb15832ea9a6fcb726c
Author: Garrett Regier <garrettregier gmail com>
Date: Sat Dec 20 09:14:24 2014 -0800
Don't use g_strv_length()
Testing for NULL is will give the same result.
libpeas-gtk/peas-gtk-plugin-manager-store.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libpeas-gtk/peas-gtk-plugin-manager-store.c b/libpeas-gtk/peas-gtk-plugin-manager-store.c
index ac415d1..01ab3c3 100644
--- a/libpeas-gtk/peas-gtk-plugin-manager-store.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager-store.c
@@ -127,7 +127,7 @@ update_plugin (PeasGtkPluginManagerStore *store,
icon_theme = gtk_icon_theme_get_default ();
names = g_themed_icon_get_names (G_THEMED_ICON (icon_gicon));
- for (i = 0; !found_icon && i < g_strv_length ((gchar **) names); ++i)
+ for (i = 0; !found_icon && names[i] != NULL; ++i)
found_icon = gtk_icon_theme_has_icon (icon_theme, names[i]);
if (!found_icon)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]