pidgin: e82c55dd: Fix formatting by a third grader with a ...

elb at pidgin.im elb at pidgin.im
Mon Aug 15 00:22:06 EDT 2011


----------------------------------------------------------------------
Revision: e82c55dd768472ac776e9b8db4f25af4532300d1
Parent:   dc47c12109d5d42c8d34d4862016c2d98a684d68
Author:   elb at pidgin.im
Date:     08/15/11 00:18:59
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e82c55dd768472ac776e9b8db4f25af4532300d1

Changelog: 

Fix formatting by a third grader with a crayon

Changes against parent dc47c12109d5d42c8d34d4862016c2d98a684d68

  patched  libpurple/nat-pmp.c

-------------- next part --------------
============================================================
--- libpurple/nat-pmp.c	449a864a077ace3327011b0d43db7daad3a0a732
+++ libpurple/nat-pmp.c	80b35ed22c603b253dba2be35e904c77f9c4d7f4
@@ -177,43 +177,43 @@ default_gw()
 default_gw()
 {
 	int mib[6];
-    size_t needed;
-    char *buf, *next, *lim;
-    struct rt_msghdr *rtm;
-    struct sockaddr *sa;
+	size_t needed;
+	char *buf, *next, *lim;
+	struct rt_msghdr *rtm;
+	struct sockaddr *sa;
 	struct sockaddr_in *sin = NULL;
 
-    mib[0] = CTL_NET;
-    mib[1] = PF_ROUTE; /* entire routing table or a subset of it */
-    mib[2] = 0; /* protocol number - always 0 */
-    mib[3] = 0; /* address family - 0 for all addres families */
-    mib[4] = NET_RT_DUMP;
-    mib[5] = 0;
+	mib[0] = CTL_NET;
+	mib[1] = PF_ROUTE; /* entire routing table or a subset of it */
+	mib[2] = 0; /* protocol number - always 0 */
+	mib[3] = 0; /* address family - 0 for all addres families */
+	mib[4] = NET_RT_DUMP;
+	mib[5] = 0;
 
 	/* Determine the buffer side needed to get the full routing table */
-    if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
+	if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
 	{
 		purple_debug_warning("nat-pmp", "sysctl: net.route.0.0.dump estimate\n");
 		return NULL;
-    }
+	}
 
-    if (!(buf = malloc(needed)))
+	if (!(buf = malloc(needed)))
 	{
 		purple_debug_warning("nat-pmp", "Failed to malloc %" G_GSIZE_FORMAT "\n", needed);
 		return NULL;
-    }
+	}
 
 	/* Read the routing table into buf */
-    if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0)
+	if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0)
 	{
 		free(buf);
 		purple_debug_warning("nat-pmp", "sysctl: net.route.0.0.dump\n");
 		return NULL;
-    }
+	}
 
-    lim = buf + needed;
+	lim = buf + needed;
 
-    for (next = buf; next < lim; next += rtm->rtm_msglen)
+	for (next = buf; next < lim; next += rtm->rtm_msglen)
 	{
 		rtm = (struct rt_msghdr *)next;
 		sa = (struct sockaddr *)(rtm + 1);
@@ -226,7 +226,7 @@ default_gw()
 			    && cursin->sin_addr.s_addr == INADDR_ANY)
 			{
 				/* We found the default route. Now get the destination address and netmask. */
-	            struct sockaddr *rti_info[RTAX_MAX];
+				struct sockaddr *rti_info[RTAX_MAX];
 				struct sockaddr addr, mask;
 
 				get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
@@ -257,7 +257,7 @@ default_gw()
 				}
 			}
 		}
-    }
+	}
 
 	free(buf);
 	return sin;


More information about the Commits mailing list