diff --git a/glib/gunicollate.c b/glib/gunicollate.c index d54ef19ed..dfed1041d 100644 --- a/glib/gunicollate.c +++ b/glib/gunicollate.c @@ -441,7 +441,7 @@ g_utf8_collate_key (const gchar *str, if (str_locale) { xfrm_len = strxfrm (NULL, str_locale, 0); - if (xfrm_len < 0 || xfrm_len >= G_MAXINT - 2) + if (xfrm_len >= G_MAXINT - 2) { g_free (str_locale); str_locale = NULL; diff --git a/glib/tests/once.c b/glib/tests/once.c index 8fc8d5014..ea521c05b 100644 --- a/glib/tests/once.c +++ b/glib/tests/once.c @@ -192,7 +192,7 @@ test_once_init_multi_threaded (void) static void test_once_init_string (void) { - static const gchar *val; + static gchar *val; g_test_summary ("Test g_once_init_{enter,leave}() usage with a string");