summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-02-23 23:33:13 -0800
committerDan Nicholson <dbn.lists@gmail.com>2013-02-23 23:33:13 -0800
commit2e70862c8257564d7e8d9f9f2b93059cdef4df38 (patch)
treeeb0f2aa6dba5c20460b40a499f182d4cf9a79706 /src
parentc7ebc73c89db6e9ee6c53d13d97707f75372e5e1 (diff)
mime: Use G_N_ELEMENTS instead of separate variable
Diffstat (limited to 'src')
-rw-r--r--src/evbp-mime.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/evbp-mime.c b/src/evbp-mime.c
index 628862e..29220c9 100644
--- a/src/evbp-mime.c
+++ b/src/evbp-mime.c
@@ -62,14 +62,13 @@ static const struct {
{ "application/oxps", "xps,oxps" },
{ "application/vnd.ms-xpsdocument", "xps,oxps" },
};
-static const int n_mime_suffix = sizeof(mime_suffix) / sizeof(mime_suffix[0]);
const gchar *
evbp_mime_get_suffix(const gchar *type)
{
int i;
- for (i = 0; i < n_mime_suffix; i++)
+ for (i = 0; i < G_N_ELEMENTS(mime_suffix); i++)
if (strcmp(type, mime_suffix[i].mime) == 0)
return mime_suffix[i].exts;
return "";