[geocode-glib] lib: Simplify while loop into a for loop
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] lib: Simplify while loop into a for loop
- Date: Mon, 14 Jan 2013 07:01:08 +0000 (UTC)
commit 04523dcc38714b48ee3b0a0d5a0f0c4c5094b4de
Author: Bastien Nocera <hadess hadess net>
Date: Sun Dec 2 22:37:50 2012 +0100
lib: Simplify while loop into a for loop
geocode-glib/geocode-forward.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/geocode-glib/geocode-forward.c b/geocode-glib/geocode-forward.c
index b7ce2f2..9015f8d 100644
--- a/geocode-glib/geocode-forward.c
+++ b/geocode-glib/geocode-forward.c
@@ -675,11 +675,9 @@ make_location_list_from_tree (GNode *node,
}
}
- child = node->children;
- while (child) {
+ for (child = node->children; child != NULL; child = child->next)
make_location_list_from_tree (child, s_array, location_list, i);
- child = child->next;
- }
+
if (add_attribute)
i--;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]