[gnome-control-center/gnome-3-22] keyboard: Fix check for existing shortcut settings



commit 034181dc16db63664f65a35718ece5e63e23d88e
Author: Rui Matos <tiagomatos gmail com>
Date:   Fri Mar 17 15:08:05 2017 +0100

    keyboard: Fix check for existing shortcut settings
    
    From a Coverity scan:
    
    panels/keyboard/cc-keyboard-manager.c:208: unreachable: Since the loop
    increment "i++;" is unreachable, the loop body will never execute more
    than once.
    
    This seems like a logic thinko introduced in commit
    3207fe97ec516c11f2f781269f9342f36fa8161b . In practice it was unlikely
    to be a problem since we don't have repeated shortcut gsettings key
    names in all our KeyListEntries files.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780312

 panels/keyboard/cc-keyboard-manager.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-manager.c b/panels/keyboard/cc-keyboard-manager.c
index 1f90ca7..84e1e15 100644
--- a/panels/keyboard/cc-keyboard-manager.c
+++ b/panels/keyboard/cc-keyboard-manager.c
@@ -214,8 +214,6 @@ have_key_for_group (CcKeyboardManager *self,
             {
               return TRUE;
             }
-
-          return FALSE;
         }
     }
 


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