[gtk+/gtk-3-6] gtkliststore: Add explicit braces to avoid dangling else



commit 2e9e739111b6e54943f84b829b204e21ab6b3875
Author: Kalev Lember <kalevlember gmail com>
Date:   Sat Dec 1 13:58:41 2012 +0100

    gtkliststore: Add explicit braces to avoid dangling else
    
    Otherwise the following else becomes attached to the wrong if.

 gtk/gtkliststore.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c
index 2d49a73..467bac0 100644
--- a/gtk/gtkliststore.c
+++ b/gtk/gtkliststore.c
@@ -2437,10 +2437,12 @@ list_store_start_element (GMarkupParseContext *context,
   else if (strcmp (element_name, "row") == 0)
     ;
   else if (strcmp (element_name, "column") == 0)
-    for (i = 0; names[i]; i++)
-      if (strcmp (names[i], "type") == 0)
-	data->column_type_names = g_slist_prepend (data->column_type_names,
-						   g_strdup (values[i]));
+    {
+      for (i = 0; names[i]; i++)
+        if (strcmp (names[i], "type") == 0)
+          data->column_type_names = g_slist_prepend (data->column_type_names,
+                                                     g_strdup (values[i]));
+    }
   else if (strcmp (element_name, "columns") == 0)
     ;
   else if (strcmp (element_name, "data") == 0)



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