aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-10-25 05:55:54 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-10-27 21:25:01 +0800
commit58166e645971a4812fef23702f45cacc8e64e419 (patch)
treebedad70e39e2215a53105e0303c168e86140371a /plugins
parentc58b70659747967568a536e217b9440424709f92 (diff)
downloadgsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.gz
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.bz2
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.lz
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.xz
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.zst
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.zip
Prefer G_N_ELEMENTS over sizeof calculations.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/prefer-plain/prefer-plain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index 39e8d66b58..58d3425ffe 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -239,7 +239,7 @@ org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItem
dropdown = (GtkComboBox *)gtk_combo_box_new();
cell = gtk_cell_renderer_text_new();
store = gtk_list_store_new(1, G_TYPE_STRING);
- for (i=0;i<sizeof(epp_options)/sizeof(epp_options[0]);i++) {
+ for (i = 0; i < G_N_ELEMENTS (epp_options); i++) {
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, _(epp_options[i].label), -1);
}
@@ -289,7 +289,7 @@ e_plugin_lib_enable(EPlugin *ep, gint enable)
epp_gconf = gconf_client_get_default();
key = gconf_client_get_string(epp_gconf, "/apps/evolution/eplugin/prefer_plain/mode", NULL);
if (key) {
- for (i=0;i<sizeof(epp_options)/sizeof(epp_options[0]);i++) {
+ for (i = 0; i < G_N_ELEMENTS (epp_options); i++) {
if (!strcmp(epp_options[i].key, key)) {
epp_mode = i;
break;