[glib: 2/5] gunicollate: Remove tautological comparison



commit 3c4ff30c0fd9d659ba2d34ce83c5a8cdc406efa4
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Oct 8 13:50:13 2019 +0100

    gunicollate: Remove tautological comparison
    
    As an unsigned integer, this variable is always greater than or equal to
    zero. Fixes a compiler warning on Android.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/gunicollate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gunicollate.c b/glib/gunicollate.c
index f6599f1fb..d54ef19ed 100644
--- a/glib/gunicollate.c
+++ b/glib/gunicollate.c
@@ -428,7 +428,7 @@ g_utf8_collate_key (const gchar *str,
   if (g_get_charset (&charset))
     {
       xfrm_len = strxfrm (NULL, str_norm, 0);
-      if (xfrm_len >= 0 && xfrm_len < G_MAXINT - 2)
+      if (xfrm_len < G_MAXINT - 2)
         {
           result = g_malloc (xfrm_len + 1);
           strxfrm (result, str_norm, xfrm_len + 1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]