aboutsummaryrefslogtreecommitdiffstats
path: root/filter
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 /filter
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 'filter')
-rw-r--r--filter/filter-datespec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c
index 5d1e573f9b..a0e981d111 100644
--- a/filter/filter-datespec.c
+++ b/filter/filter-datespec.c
@@ -91,7 +91,6 @@ static const timespan timespans[] = {
#undef ngettext
#define DAY_INDEX 3
-#define N_TIMESPANS (sizeof (timespans) / sizeof (timespans[0]))
struct _FilterDatespecPrivate {
GtkWidget *label_button;
@@ -264,7 +263,7 @@ get_best_span (time_t val)
{
gint i;
- for (i=N_TIMESPANS-1;i>=0;i--) {
+ for (i=G_N_ELEMENTS (timespans)-1;i>=0;i--) {
if (val % timespans[i].seconds == 0)
return i;
}