aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
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 /em-format
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 'em-format')
-rw-r--r--em-format/em-format-quote.c2
-rw-r--r--em-format/em-format.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
index c329769976..05fefa02e6 100644
--- a/em-format/em-format-quote.c
+++ b/em-format/em-format-quote.c
@@ -588,6 +588,6 @@ emfq_builtin_init(EMFormatQuoteClass *efhc)
{
gint i;
- for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
+ for (i = 0; i < G_N_ELEMENTS (type_builtin_table); i++)
em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
}
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 3308763ee5..1285bcbf92 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -981,7 +981,7 @@ em_format_default_headers(EMFormat *emf)
gint i;
em_format_clear_headers(emf);
- for (i=0; i<sizeof(default_headers)/sizeof(default_headers[0]); i++)
+ for (i = 0; i < G_N_ELEMENTS (default_headers); i++)
em_format_add_header(emf, default_headers[i].name, default_headers[i].flags);
}
@@ -1988,7 +1988,7 @@ emf_builtin_init(EMFormatClass *class)
{
gint i;
- for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
+ for (i = 0; i < G_N_ELEMENTS (type_builtin_table); i++)
g_hash_table_insert(class->type_handlers, type_builtin_table[i].mime_type, &type_builtin_table[i]);
}