[gtk+] testgtk: Simplify code
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testgtk: Simplify code
- Date: Wed, 28 Sep 2011 03:36:26 +0000 (UTC)
commit 9972a1813edc34fbb0c8745c3ea41c50e1e67173
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 28 04:42:54 2011 +0200
testgtk: Simplify code
Use a for loop for iterating.
tests/testgtk.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 37ba800..932e6b7 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -5255,13 +5255,9 @@ make_focus_table (GList **list)
table = gtk_table_new (5, 5, FALSE);
- i = 0;
- j = 0;
-
- while (i < 5)
+ for (i = 0; i < 5; i++)
{
- j = 0;
- while (j < 5)
+ for (j = 0; j < 5; j++)
{
GtkWidget *widget;
@@ -5279,11 +5275,7 @@ make_focus_table (GList **list)
GTK_EXPAND | GTK_FILL,
GTK_EXPAND | GTK_FILL,
5, 5);
-
- ++j;
}
-
- ++i;
}
*list = g_list_reverse (*list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]