(svn r217) -Fix: remove warning and simplify loop network_gui.c (Tron)
authordarkvater
Sun, 12 Sep 2004 17:37:37 +0000
changeset 216 1be476b97e32
parent 215 a829221214b5
child 217 1685d9cedba8
(svn r217) -Fix: remove warning and simplify loop network_gui.c (Tron)
network_gui.c
--- a/network_gui.c	Sun Sep 12 17:36:29 2004 +0000
+++ b/network_gui.c	Sun Sep 12 17:37:37 2004 +0000
@@ -119,12 +119,8 @@
 
 			{
 				NetworkGameList *cur_item = _network_game_list;
-				int32 n = 0;
-				while (cur_item != NULL) {
-					if (n++ == id_v) { break;} // found clicked item
-
+				for (; id_v > 0 && cur_item != NULL; id_v--)
 					cur_item = cur_item->_next;
-				}
 
 				if (cur_item == NULL) { return;} // click out of vehicle bounds