summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'libappstream-glib/as-tag.c')
-rw-r--r--libappstream-glib/as-tag.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libappstream-glib/as-tag.c b/libappstream-glib/as-tag.c
index bd78939..83b2761 100644
--- a/libappstream-glib/as-tag.c
+++ b/libappstream-glib/as-tag.c
@@ -75,9 +75,7 @@ as_tag_from_string (const gchar *tag)
AsTag
as_tag_from_string_full (const gchar *tag, AsTagFlags flags)
{
-#ifdef HAVE_GPERF
- const struct tag_data *ky;
-#else
+#ifndef HAVE_GPERF
guint i;
#endif
AsTag etag = AS_TAG_UNKNOWN;
@@ -88,9 +86,7 @@ as_tag_from_string_full (const gchar *tag, AsTagFlags flags)
#ifdef HAVE_GPERF
/* use a perfect hash */
- ky = _as_tag_from_gperf (tag, (guint) strlen (tag));
- if (ky != NULL)
- etag = ky->etag;
+ etag = _as_tag_from_gperf (tag);
#else
for (i = 0; i < AS_TAG_LAST; i++) {
if (g_strcmp0 (tag, as_tag_to_string (i)) == 0) {