diff options
author | Richard Hughes <richard@hughsie.com> | 2018-05-18 15:11:16 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2018-05-21 17:16:29 +0100 |
commit | 2adf94cab7fc82dade7396bd93c9d8206f2d9b68 (patch) | |
tree | ac8fec69a7d4b01e8eeff00ad5e9ed5ccb8f5a5b /libappstream-glib/as-node.c | |
parent | f0f46f9bdc6ea6533dace779826f371718e62c91 (diff) | |
download | appstream-glib-2adf94cab7fc82dade7396bd93c9d8206f2d9b68.tar.gz |
trivial: Always store the locale of 'C' as a static string
Diffstat (limited to 'libappstream-glib/as-node.c')
-rw-r--r-- | libappstream-glib/as-node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libappstream-glib/as-node.c b/libappstream-glib/as-node.c index 6b64db6..b98cd45 100644 --- a/libappstream-glib/as-node.c +++ b/libappstream-glib/as-node.c @@ -2013,7 +2013,7 @@ as_node_fix_locale_full (const GNode *node, const gchar *locale) GNode *root = g_node_get_root ((GNode *) node); AsNodeRoot *root_data = ((AsNodeData *)root->data)->root; - if (locale == NULL) + if (locale == NULL || g_strcmp0 (locale, "C") == 0) return as_ref_string_new_static ("C"); if (g_strcmp0 (locale, "xx") == 0) return NULL; @@ -2035,7 +2035,7 @@ as_node_fix_locale_full (const GNode *node, const gchar *locale) AsRefString * as_node_fix_locale (const gchar *locale) { - if (locale == NULL) + if (locale == NULL || g_strcmp0 (locale, "C") == 0) return as_ref_string_new_static ("C"); if (g_strcmp0 (locale, "xx") == 0) return NULL; |