[gtk+/rendering-cleanup-next: 58/199] notebook: Use a for loop when iterating over a list



commit 88b6fecc65e688496ef45e9f360c9b88e38e61f6
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 6 23:15:56 2010 +0200

    notebook: Use a for loop when iterating over a list

 gtk/gtknotebook.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 74fe0b3..0ff6938 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2288,12 +2288,9 @@ gtk_notebook_expose (GtkWidget      *widget,
 	  GtkNotebookPage *page;
 	  GList *pages;
 
-	  pages = priv->children;
-
-	  while (pages)
-	    {
+	  for (pages = priv->children; pages; pages = pages->next)
+            {
 	      page = GTK_NOTEBOOK_PAGE (pages);
-	      pages = pages->next;
 
 	      if (gtk_widget_get_window (page->tab_label) == event->window &&
 		  gtk_widget_is_drawable (page->tab_label))



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