aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/recurrence-page.c
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 /calendar/gui/dialogs/recurrence-page.c
parentc58b70659747967568a536e217b9440424709f92 (diff)
downloadgsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.gz
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.zst
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.zip
Prefer G_N_ELEMENTS over sizeof calculations.
Diffstat (limited to 'calendar/gui/dialogs/recurrence-page.c')
-rw-r--r--calendar/gui/dialogs/recurrence-page.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index a94fe9e37f..8b341f5bc8 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -1050,7 +1050,7 @@ make_recur_month_num_combo (gint month_index)
store = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_INT);
/* Relation */
- for (i = 0; i < sizeof (options) / sizeof (options[0]); i++) {
+ for (i = 0; i < G_N_ELEMENTS (options); i++) {
gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter, 0, _(options [i]), 1, month_num_options_map [i], -1);
}
@@ -1120,7 +1120,7 @@ make_recur_month_combobox (void)
combo = gtk_combo_box_new_text ();
- for (i = 0; i < sizeof (options) / sizeof (options[0]); i++) {
+ for (i = 0; i < G_N_ELEMENTS (options); i++) {
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _(options[i]));
}
@@ -1635,7 +1635,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Any funky shit? */
-#define N_HAS_BY(field) (count_by_xxx (field, sizeof (field) / sizeof (field[0])))
+#define N_HAS_BY(field) (count_by_xxx (field, G_N_ELEMENTS (field)))
n_by_second = N_HAS_BY (r->by_second);
n_by_minute = N_HAS_BY (r->by_minute);