Fix comparison of unsigned expression < 0 is always false warning in glib/gunicollate.c

glib/gunicollate.c:444:17: warning: comparison of unsigned expression < 0 is always false
          if (xfrm_len < 0 || xfrm_len >= G_MAXINT - 2)
              ~~~~~~~~ ^ ~
This commit is contained in:
Emmanuel Fleury 2021-05-08 10:14:10 +02:00
parent 601ef3b6be
commit 6d8caf6482

View File

@ -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;