[Telepathy-commits] [telepathy-gabble/master] gabble_bytestream_socks5_initiate: use a for to iterate on the IP's list

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Mar 16 03:11:45 PDT 2009


---
 src/bytestream-socks5.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c
index 5de87f3..82fc6a6 100644
--- a/src/bytestream-socks5.c
+++ b/src/bytestream-socks5.c
@@ -1614,8 +1614,8 @@ gabble_bytestream_socks5_initiate (GabbleBytestreamIface *iface)
       ')', NULL);
 
   ips = get_local_interfaces_ips (FALSE);
-  ip = ips;
-  while (ip)
+
+  for (ip = ips; ip != NULL; ip = g_list_next (ip))
     {
       LmMessageNode *node = lm_message_node_add_child (msg->node->children,
           "streamhost", "");
@@ -1626,7 +1626,6 @@ gabble_bytestream_socks5_initiate (GabbleBytestreamIface *iface)
           NULL);
 
       g_free (ip->data);
-      ip = ip->next;
     }
   g_list_free (ips);
   g_free (port);
-- 
1.5.6.5




More information about the telepathy-commits mailing list