diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-10-25 05:55:54 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-10-27 21:25:01 +0800 |
commit | 58166e645971a4812fef23702f45cacc8e64e419 (patch) | |
tree | bedad70e39e2215a53105e0303c168e86140371a /mail/em-vfolder-rule.c | |
parent | c58b70659747967568a536e217b9440424709f92 (diff) | |
download | gsoc2013-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 'mail/em-vfolder-rule.c')
-rw-r--r-- | mail/em-vfolder-rule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c index 2ccbe1378d..3a87c09751 100644 --- a/mail/em-vfolder-rule.c +++ b/mail/em-vfolder-rule.c @@ -258,7 +258,7 @@ xml_encode(FilterRule *fr) node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr); g_return_val_if_fail (node != NULL, NULL); - g_return_val_if_fail (vr->with < sizeof(with_names)/sizeof(with_names[0]), NULL); + g_return_val_if_fail (vr->with < G_N_ELEMENTS (with_names), NULL); set = xmlNewNode(NULL, (const guchar *)"sources"); xmlAddChild(node, set); @@ -279,7 +279,7 @@ set_with(EMVFolderRule *vr, const gchar *name) { gint i; - for (i=0;i<sizeof(with_names)/sizeof(with_names[0]);i++) { + for (i = 0; i < G_N_ELEMENTS (with_names); i++) { if (!strcmp(name, with_names[i])) { vr->with = i; return; |