pidgin.next.minor: 064d2d1b: Clean up a little.

darkrain42 at pidgin.im darkrain42 at pidgin.im
Mon Feb 15 19:40:48 EST 2010


-----------------------------------------------------------------
Revision: 064d2d1b2f96be3cfdc5d15af37aaa8e16150904
Ancestor: e3c37618072e58cecd470d6df754a802dc307b34
Author: darkrain42 at pidgin.im
Date: 2010-02-15T22:32:33
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/064d2d1b2f96be3cfdc5d15af37aaa8e16150904

Modified files:
        libpurple/network.c

ChangeLog: 

Clean up a little.

-------------- next part --------------
============================================================
--- libpurple/network.c	df30ee6f7e5535a51355052fe751432ac3270f62
+++ libpurple/network.c	df0dd1f1e7e8019d5ad36ba5c69e41668eab4166
@@ -160,7 +160,7 @@ purple_network_get_local_system_ip(int f
 	struct ifconf ifc;
 	struct ifreq *ifr;
 	struct sockaddr_in *sinptr;
-	guint32 lhost = htonl(127 * 256 * 256 * 256 + 1);
+	guint32 lhost = htonl((127 << 24) + 1); /* 127.0.0.1 */
 	long unsigned int add;
 	int source = fd;
 
@@ -204,12 +204,12 @@ purple_network_get_all_local_system_ips(
 purple_network_get_all_local_system_ips(void)
 {
 	GList *result = NULL;
-	int source = source = socket(PF_INET,SOCK_STREAM, 0);
+	int source = socket(PF_INET,SOCK_STREAM, 0);
 	char buffer[1024];
 	char *tmp;
 	struct ifconf ifc;
 	struct ifreq *ifr;
-	
+
 	ifc.ifc_len = sizeof(buffer);
 	ifc.ifc_req = (struct ifreq *)buffer;
 	ioctl(source, SIOCGIFCONF, &ifc);


More information about the Commits mailing list