changeset 1895:64aa7ab6b9b4 draft

White space police
author Roy Marples <roy@marples.name>
date Thu, 04 Apr 2013 20:31:04 +0000
parents ba2560bb382a
children c66c14b42827
files arp.c arp.h common.c common.h control.c control.h dhcp-common.c dhcp-common.h dhcp.c dhcp.h dhcpcd.c dhcpcd.h duid.c duid.h eloop.c eloop.h if-bsd.c if-linux-wireless.c if-linux.c if-options.c if-options.h if-pref.c if-pref.h ipv4.c ipv4.h ipv4ll.c ipv4ll.h ipv6.c ipv6.h ipv6ns.c ipv6ns.h ipv6rs.c ipv6rs.h net.c net.h platform-bsd.c platform.h script.c script.h signals.c signals.h
diffstat 41 files changed, 66 insertions(+), 67 deletions(-) [+]
line wrap: on
line diff
--- a/arp.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/arp.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/arp.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/arp.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/common.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/common.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/common.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/common.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
@@ -46,7 +46,7 @@
 	ms = (tv)->tv_sec * 1000;					\
 	ms += (tv)->tv_usec / 1000;					\
 } while (0 /* CONSTCOND */);
-#define ms_to_tv(tv, ms) do { 						\
+#define ms_to_tv(tv, ms) do {						\
 	(tv)->tv_sec = ms / 1000;					\
 	(tv)->tv_usec = (ms - ((tv)->tv_sec * 1000)) * 1000;		\
 } while (0 /* CONSTCOND */);
--- a/control.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/control.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/control.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/control.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/dhcp-common.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/dhcp-common.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
@@ -198,7 +198,7 @@
 		case '\'': /* FALLTHROUGH */
 		case '$':  /* FALLTHROUGH */
 		case '`':  /* FALLTHROUGH */
- 		case '\\': /* FALLTHROUGH */
+		case '\\': /* FALLTHROUGH */
 		case '|':  /* FALLTHROUGH */
 		case '&':
 			if (s) {
--- a/dhcp-common.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/dhcp-common.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/dhcp.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/dhcp.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
@@ -77,7 +77,7 @@
 #define IPV4A		ADDRIPV4 | ARRAY
 #define IPV4R		ADDRIPV4 | REQUEST
 
-/* We should define a maximum for the NAK exponential backoff */ 
+/* We should define a maximum for the NAK exponential backoff */
 #define NAKOFF_MAX              60
 
 /* Wait N nanoseconds between sending a RELEASE and dropping the address.
@@ -106,7 +106,7 @@
 	{ 1,	ADDRIPV4 | REQUEST,	"subnet_mask" },
 		/* RFC 3442 states that the CSR has to come before all other
 		 * routes. For completeness, we also specify static routes,
-	 	 * then routers. */
+		 * then routers. */
 	{ 121,  RFC3442,	"classless_static_routes" },
 	{ 249,  RFC3442,	"ms_classless_static_routes" },
 	{ 33,	IPV4A | REQUEST,	"static_routes" },
@@ -117,7 +117,7 @@
 	{ 6,	IPV4A,		"domain_name_servers" },
 	{ 7,	IPV4A,		"log_servers" },
 	{ 8,	IPV4A,		"cookie_servers" },
-	{ 9, 	IPV4A,		"lpr_servers" },
+	{ 9,	IPV4A,		"lpr_servers" },
 	{ 10,	IPV4A,		"impress_servers" },
 	{ 11,	IPV4A,		"resource_location_servers" },
 	{ 12,	STRING,		"host_name" },
@@ -142,7 +142,7 @@
 	{ 31,	UINT8,		"router_discovery" },
 	{ 32,	ADDRIPV4,	"router_solicitation_address" },
 	{ 34,	UINT8,		"trailer_encapsulation" },
-	{ 35, 	UINT32,		"arp_cache_timeout" },
+	{ 35,	UINT32,		"arp_cache_timeout" },
 	{ 36,	UINT16,		"ieee802_3_encapsulation" },
 	{ 37,	UINT8,		"default_tcp_ttl" },
 	{ 38,	UINT32,		"tcp_keepalive_interval" },
@@ -157,7 +157,7 @@
 	{ 47,	STRING,		"netbios_scope" },
 	{ 48,	IPV4A,		"font_servers" },
 	{ 49,	IPV4A,		"x_display_manager" },
-	{ 50, 	ADDRIPV4,	"dhcp_requested_address" },
+	{ 50,	ADDRIPV4,	"dhcp_requested_address" },
 	{ 51,	UINT32 | REQUEST,	"dhcp_lease_time" },
 	{ 52,	UINT8,		"dhcp_option_overload" },
 	{ 53,	UINT8,		"dhcp_message_type" },
@@ -311,7 +311,7 @@
 					atexit(free_option_buffer);
 #endif
 				}
-				if (!bp) 
+				if (!bp)
 					bp = opt_buffer;
 				memcpy(bp, op, ol);
 				bp += ol;
@@ -591,12 +591,12 @@
 		errno = EINVAL;
 		return 0;
 	}
-	
+
 	ipv4masklen = *p++;
 	pl--;
 	ipv6prefixlen = *p++;
 	pl--;
-	
+
 	for (i = 0; i < 16; i++) {
 		ipv6prefix[i] = *p++;
 		pl--;
@@ -614,7 +614,7 @@
 		    ipv6prefix[8], ipv6prefix[9], ipv6prefix[10],ipv6prefix[11],
 		    ipv6prefix[12],ipv6prefix[13],ipv6prefix[14], ipv6prefix[15]
 		);
-		    
+
 		len -= b;
 		out += b;
 		bytes += b;
@@ -628,7 +628,7 @@
 		br[2] = *p++;
 		br[3] = *p++;
 		pl -= 4;
-		
+
 		if (out) {
 			b= snprintf(out, len, " %d.%d.%d.%d",
 			    br[0], br[1], br[2], br[3]);
@@ -639,7 +639,7 @@
 			bytes += (4 * 4);
 		}
 	}
-	
+
 	return bytes;
 }
 
@@ -913,7 +913,7 @@
 	dhcp->xid = htonl(state->xid);
 	dhcp->cookie = htonl(MAGIC_COOKIE);
 
-	*p++ = DHO_MESSAGETYPE; 
+	*p++ = DHO_MESSAGETYPE;
 	*p++ = 1;
 	*p++ = type;
 
@@ -1043,7 +1043,7 @@
 		n_params = p;
 		*p++ = 0;
 		for (opt = dhcp_opts; opt->option; opt++) {
-			if (!(opt->type & REQUEST || 
+			if (!(opt->type & REQUEST ||
 				has_option_mask(ifo->requestmask, opt->option)))
 				continue;
 			if (type == DHCP_INFORM &&
@@ -1290,7 +1290,7 @@
 	uint32_t xid;
 
 	if (ifp->options->options & DHCPCD_XID_HWADDR &&
-	    ifp->hwlen >= sizeof(xid)) 
+	    ifp->hwlen >= sizeof(xid))
 		/* The lower bits are probably more unique on the network */
 		memcpy(&xid, (ifp->hwaddr + ifp->hwlen) - sizeof(xid),
 		    sizeof(xid));
@@ -1357,7 +1357,7 @@
 		goto eexit;
 #endif
 	/* As we don't use this socket for receiving, set the
-	 * 	 * receive buffer to 1 */
+	 * receive buffer to 1 */
 	n = 1;
 	if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n)) == -1)
 		goto eexit;
@@ -1879,7 +1879,7 @@
 	struct if_options *ifo;
 	struct dhcp_state *state;
 	struct in_addr addr, net, dst;
-	
+
 	ifo = ifp->options;
 	if (ifo->req_addr.s_addr != INADDR_ANY)
 		return 0;
@@ -2072,7 +2072,7 @@
 blacklisted_ip(const struct if_options *ifo, in_addr_t addr)
 {
 	size_t i;
-	
+
 	for (i = 0; i < ifo->blacklist_len; i += 2)
 		if (ifo->blacklist[i] == (addr & ifo->blacklist[i + 1]))
 			return 1;
@@ -2108,7 +2108,7 @@
 	state->interval = 0;
 
 	/* We may have found a BOOTP server */
-	if (get_option_uint8(&type, dhcp, DHO_MESSAGETYPE) == -1) 
+	if (get_option_uint8(&type, dhcp, DHO_MESSAGETYPE) == -1)
 		type = 0;
 
 	if (type == DHCP_NAK) {
@@ -2527,7 +2527,7 @@
 
 	ifo = ifp->options;
 	/* We need to drop the leasefile so that start_interface
-	 * doesn't load it. */	
+	 * doesn't load it. */
 	if (ifo->options & DHCPCD_REQUEST)
 		unlink(state->leasefile);
 
@@ -2681,4 +2681,3 @@
 	else
 		dhcp_reboot(ifp);
 }
-
--- a/dhcp.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/dhcp.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/dhcpcd.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/dhcpcd.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/dhcpcd.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/dhcpcd.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
@@ -42,9 +42,9 @@
 #define IF_SSIDSIZE 33
 #define PROFILE_LEN 64
 
-#define LINK_UP 	1
+#define LINK_UP		1
 #define LINK_UNKNOWN	0
-#define LINK_DOWN 	-1
+#define LINK_DOWN	-1
 
 #define IF_DATA_DHCP	0
 #define IF_DATA_IPV6RS	1
--- a/duid.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/duid.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2008 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/duid.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/duid.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2008 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/eloop.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/eloop.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/eloop.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/eloop.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/if-bsd.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/if-bsd.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/if-linux-wireless.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/if-linux-wireless.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2009-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/if-linux.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/if-linux.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/if-options.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/if-options.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/if-options.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/if-options.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/if-pref.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/if-pref.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/if-pref.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/if-pref.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2008 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv4.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv4.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv4.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv4.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv4ll.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv4ll.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv4ll.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv4ll.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv6.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv6.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv6.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv6.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv6ns.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv6ns.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv6ns.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv6ns.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
@@ -32,8 +32,8 @@
 #include "ipv6rs.h"
 
 #define MAX_REACHABLE_TIME	3600	/* seconds */
-#define REACHABLE_TIME		30 	/* seconds */
-#define RETRANS_TIMER		1  	/* second */
+#define REACHABLE_TIME		30	/* seconds */
+#define RETRANS_TIMER		1	/* second */
 #define DELAY_FIRST_PROBE_TIME	5	/* seconds */
 
 int ipv6ns_init(void);
--- a/ipv6rs.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv6rs.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/ipv6rs.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/ipv6rs.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/net.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/net.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/net.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/net.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/platform-bsd.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/platform-bsd.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/platform.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/platform.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/script.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/script.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/script.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/script.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/signals.c	Thu Apr 04 20:31:04 2013 +0000
+++ b/signals.c	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved
--- a/signals.h	Thu Apr 04 20:31:04 2013 +0000
+++ b/signals.h	Thu Apr 04 20:31:04 2013 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * dhcpcd - DHCP client daemon
  * Copyright (c) 2006-2013 Roy Marples <roy@marples.name>
  * All rights reserved