[glib/glib-2-68: 1/3] gkeyfile: Drop a redundant check




commit 07ab2e26c937a93ae7389e002014e32aa78e4ec6
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Mar 23 16:27:49 2021 +0000

    gkeyfile: Drop a redundant check
    
    It should not be possible for `->locales` to be set without
    `->checked_locales` being set, so drop the redundant check. This helps
    with branch code coverage.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 glib/gkeyfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 50859164b..06c4b7c47 100644
--- a/glib/gkeyfile.c
+++ b/glib/gkeyfile.c
@@ -1232,7 +1232,7 @@ g_key_file_locale_is_interesting (GKeyFile    *key_file,
   if (key_file->flags & G_KEY_FILE_KEEP_TRANSLATIONS)
     return TRUE;
 
-  if (!key_file->checked_locales && !key_file->locales)
+  if (!key_file->checked_locales)
     {
       key_file->locales = g_strdupv ((gchar **)g_get_language_names ());
       key_file->checked_locales = TRUE;


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