aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
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 /e-util
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 'e-util')
-rw-r--r--e-util/e-error.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/e-util/e-error.c b/e-util/e-error.c
index e31b7732d8..049e090fdc 100644
--- a/e-util/e-error.c
+++ b/e-util/e-error.c
@@ -102,7 +102,7 @@ map_response(const gchar *name)
{
gint i;
- for (i=0;i<sizeof(response_map)/sizeof(response_map[0]);i++)
+ for (i = 0; i < G_N_ELEMENTS (response_map); i++)
if (!strcmp(name, response_map[i].name))
return response_map[i].id;
@@ -125,7 +125,7 @@ map_type(const gchar *name)
gint i;
if (name) {
- for (i=0;i<sizeof(type_map)/sizeof(type_map[0]);i++)
+ for (i = 0; i < G_N_ELEMENTS (type_map); i++)
if (!strcmp(name, type_map[i].name))
return i;
}
@@ -320,7 +320,7 @@ ee_load_tables(void)
table = g_malloc0(sizeof(*table));
table->domain = "builtin";
table->errors = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<sizeof(default_errors)/sizeof(default_errors[0]);i++)
+ for (i = 0; i < G_N_ELEMENTS (default_errors); i++)
g_hash_table_insert(table->errors, (gpointer) default_errors[i].id, &default_errors[i]);
g_hash_table_insert(error_table, (gpointer) table->domain, table);