[gtk+] styleproperties: Don't use the same loop variable in nested loops



commit 8cebc125da7e3f9c49a6d4e0ea5320c11b7c21af
Author: Benjamin Otte <otte redhat com>
Date:   Sun Mar 20 05:37:23 2016 +0100

    styleproperties: Don't use the same loop variable in nested loops
    
    http://www.viva64.com/en/b/0383/

 gtk/deprecated/gtkstyleproperties.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/deprecated/gtkstyleproperties.c b/gtk/deprecated/gtkstyleproperties.c
index c132329..e651150 100644
--- a/gtk/deprecated/gtkstyleproperties.c
+++ b/gtk/deprecated/gtkstyleproperties.c
@@ -881,7 +881,7 @@ gtk_style_properties_merge (GtkStyleProperties       *props,
     {
       PropertyData *prop_to_merge = val;
       PropertyData *prop;
-      guint i;
+      guint i, j;
 
       prop = g_hash_table_lookup (priv->properties, key);
 
@@ -932,8 +932,8 @@ gtk_style_properties_merge (GtkStyleProperties       *props,
               array = g_value_get_boxed (_gtk_css_typed_value_get (value->value));
               array_to_merge = g_value_get_boxed (_gtk_css_typed_value_get (data->value));
 
-              for (i = 0; i < array_to_merge->len; i++)
-                g_ptr_array_add (array, g_ptr_array_index (array_to_merge, i));
+              for (i = 0; j < array_to_merge->len; j++)
+                g_ptr_array_add (array, g_ptr_array_index (array_to_merge, j));
             }
           else if (replace || value->value == NULL)
             {


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