summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTomek Mrugalski <tomek@isc.org>2022-01-19 20:14:16 +0100
committerTomek Mrugalski <tomek@isc.org>2022-01-20 12:04:28 +0100
commitf6b8f48d1665c4487dedbcfa4dca435a0d67ddeb (patch)
tree19926f31f56890bc8c7f5d3bc5b2e2c16b96794e /common
parent429a56d73c0f9f2edf400fd6313850a3ce4fd809 (diff)
downloadisc-dhcp-f6b8f48d1665c4487dedbcfa4dca435a0d67ddeb.tar.gz
[#189] Whitespace fixes in opened files
Diffstat (limited to 'common')
-rw-r--r--common/bpf.c6
-rw-r--r--common/comapi.c15
-rw-r--r--common/conflex.c71
-rw-r--r--common/ctrace.c10
-rw-r--r--common/dhcp-eval.56
-rw-r--r--common/dhcp-options.52
-rw-r--r--common/discover.c86
-rw-r--r--common/dispatch.c6
-rw-r--r--common/dlpi.c166
-rw-r--r--common/execute.c12
-rw-r--r--common/fddi.c2
-rw-r--r--common/icmp.c2
-rw-r--r--common/inet.c58
-rw-r--r--common/lpf.c4
-rw-r--r--common/ns_name.c4
-rw-r--r--common/options.c2
-rw-r--r--common/packet.c12
-rw-r--r--common/parse.c114
-rw-r--r--common/resolv.c2
-rw-r--r--common/socket.c98
-rw-r--r--common/tables.c2
-rw-r--r--common/tr.c8
-rw-r--r--common/tree.c68
-rw-r--r--common/upf.c2
24 files changed, 378 insertions, 380 deletions
diff --git a/common/bpf.c b/common/bpf.c
index 775f70ae..7e511394 100644
--- a/common/bpf.c
+++ b/common/bpf.c
@@ -520,7 +520,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
physical layer that supports this, but WTH), skip this
packet. */
if (offset < 0) {
- interface->rbuf_offset =
+ interface->rbuf_offset =
BPF_WORDALIGN(interface->rbuf_offset +
hdr.bh_caplen);
continue;
@@ -535,7 +535,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
- interface->rbuf_offset =
+ interface->rbuf_offset =
BPF_WORDALIGN(interface->rbuf_offset +
hdr.bh_caplen);
continue;
@@ -614,7 +614,7 @@ get_hw_addr(const char *name, struct hardware *hw) {
*/
sa = NULL;
for (p=ifa; (p != NULL) && (sa == NULL); p = p->ifa_next) {
- if ((p->ifa_addr->sa_family == AF_LINK) &&
+ if ((p->ifa_addr->sa_family == AF_LINK) &&
!strcmp(p->ifa_name, name)) {
sa = (struct sockaddr_dl *)p->ifa_addr;
}
diff --git a/common/comapi.c b/common/comapi.c
index 33b6b785..050fe110 100644
--- a/common/comapi.c
+++ b/common/comapi.c
@@ -59,7 +59,7 @@ void dhcp_common_objects_setup ()
dhcp_control_destroy,
dhcp_control_signal_handler,
dhcp_control_stuff_values,
- dhcp_control_lookup,
+ dhcp_control_lookup,
dhcp_control_create,
dhcp_control_remove, 0, 0, 0,
sizeof (dhcp_control_object_t),
@@ -80,7 +80,7 @@ void dhcp_common_objects_setup ()
dhcp_group_destroy,
dhcp_group_signal_handler,
dhcp_group_stuff_values,
- dhcp_group_lookup,
+ dhcp_group_lookup,
dhcp_group_create,
dhcp_group_remove, 0, 0, 0,
sizeof (struct group_object), 0,
@@ -96,7 +96,7 @@ void dhcp_common_objects_setup ()
dhcp_subnet_destroy,
dhcp_subnet_signal_handler,
dhcp_subnet_stuff_values,
- dhcp_subnet_lookup,
+ dhcp_subnet_lookup,
dhcp_subnet_create,
dhcp_subnet_remove, 0, 0, 0,
sizeof (struct subnet), 0,
@@ -113,7 +113,7 @@ void dhcp_common_objects_setup ()
dhcp_shared_network_destroy,
dhcp_shared_network_signal_handler,
dhcp_shared_network_stuff_values,
- dhcp_shared_network_lookup,
+ dhcp_shared_network_lookup,
dhcp_shared_network_create,
dhcp_shared_network_remove, 0, 0, 0,
sizeof (struct shared_network), 0, RC_MISC);
@@ -136,7 +136,7 @@ isc_result_t dhcp_group_set_value (omapi_object_t *h,
return DHCP_R_INVALIDARG;
group = (struct group_object *)h;
- /* XXX For now, we can only set these values on new group objects.
+ /* XXX For now, we can only set these values on new group objects.
XXX Soon, we need to be able to update group objects. */
if (!omapi_ds_strcmp (name, "name")) {
if (group -> name)
@@ -193,7 +193,7 @@ isc_result_t dhcp_group_set_value (omapi_object_t *h,
if (status == ISC_R_SUCCESS || status == DHCP_R_UNCHANGED)
return status;
}
-
+
return ISC_R_NOTFOUND;
}
@@ -461,7 +461,7 @@ isc_result_t dhcp_control_set_value (omapi_object_t *h,
if (status == ISC_R_SUCCESS || status == DHCP_R_UNCHANGED)
return status;
}
-
+
return ISC_R_NOTFOUND;
}
@@ -904,4 +904,3 @@ isc_result_t dhcp_shared_network_remove (omapi_object_t *lp,
{
return ISC_R_NOTIMPLEMENTED;
}
-
diff --git a/common/conflex.c b/common/conflex.c
index fb9a9df6..7b671560 100644
--- a/common/conflex.c
+++ b/common/conflex.c
@@ -55,7 +55,7 @@ isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp)
}
/*
- * We don't need to initialize things to zero here, since
+ * We don't need to initialize things to zero here, since
* dmalloc() returns memory that is set to zero.
*/
tmp->tlname = name;
@@ -112,7 +112,7 @@ isc_result_t end_parse (cfile)
if ((*cfile)->saved_state != NULL) {
dfree((*cfile)->saved_state, MDL);
}
-
+
dfree(*cfile, MDL);
*cfile = NULL;
return ISC_R_SUCCESS;
@@ -201,7 +201,7 @@ static int get_char (cfile)
if (!cfile->ugflag) {
if (c == EOL) {
- if (cfile->cur_line == cfile->line1) {
+ if (cfile->cur_line == cfile->line1) {
cfile->cur_line = cfile->line2;
cfile->prev_line = cfile->line1;
} else {
@@ -220,7 +220,7 @@ static int get_char (cfile)
}
} else
cfile->ugflag = 0;
- return c;
+ return c;
}
/*
@@ -239,11 +239,11 @@ unget_char(struct parse *cfile, int c) {
/*
* GENERAL NOTE ABOUT TOKENS
*
- * We normally only want non-whitespace tokens. There are some
+ * We normally only want non-whitespace tokens. There are some
* circumstances where we *do* want to see whitespace (for example
* when parsing IPv6 addresses).
*
- * Generally we use the next_token() function to read tokens. This
+ * Generally we use the next_token() function to read tokens. This
* in turn calls get_next_token, which does *not* return tokens for
* whitespace. Rather, it skips these.
*
@@ -269,7 +269,7 @@ get_raw_token(struct parse *cfile) {
p = cfile -> lpos;
c = get_char (cfile);
- if (!((c == '\n') && cfile->eol_token) &&
+ if (!((c == '\n') && cfile->eol_token) &&
isascii(c) && isspace(c)) {
ttok = read_whitespace(c, cfile);
break;
@@ -316,12 +316,12 @@ get_raw_token(struct parse *cfile) {
* The get_next_token() function consumes the next token and
* returns it to the caller.
*
- * Since the code is almost the same for "normal" and "raw"
+ * Since the code is almost the same for "normal" and "raw"
* input, we pass a flag to alter the way it works.
*/
-static enum dhcp_token
-get_next_token(const char **rval, unsigned *rlen,
+static enum dhcp_token
+get_next_token(const char **rval, unsigned *rlen,
struct parse *cfile, isc_boolean_t raw) {
int rv;
@@ -343,7 +343,7 @@ get_next_token(const char **rval, unsigned *rlen,
cfile->token_line = cfile->cur_line;
}
}
-
+
if (rval)
*rval = cfile -> tval;
if (rlen)
@@ -358,10 +358,10 @@ get_next_token(const char **rval, unsigned *rlen,
/*
* Get the next token from cfile and return it.
*
- * If rval is non-NULL, set the pointer it contains to
+ * If rval is non-NULL, set the pointer it contains to
* the contents of the token.
*
- * If rlen is non-NULL, set the integer it contains to
+ * If rlen is non-NULL, set the integer it contains to
* the length of the token.
*/
@@ -386,8 +386,8 @@ next_raw_token(const char **rval, unsigned *rlen, struct parse *cfile) {
* The do_peek_token() function checks the next token without
* consuming it, and returns it to the caller.
*
- * Since the code is almost the same for "normal" and "raw"
- * input, we pass a flag to alter the way it works. (See the
+ * Since the code is almost the same for "normal" and "raw"
+ * input, we pass a flag to alter the way it works. (See the
* warning in the GENERAL NOTES ABOUT TOKENS above though.)
*/
@@ -427,15 +427,15 @@ do_peek_token(const char **rval, unsigned int *rlen,
/*
- * Get the next token from cfile and return it, leaving it for a
+ * Get the next token from cfile and return it, leaving it for a
* subsequent call to next_token().
*
* Note that it WILL consume whitespace tokens.
*
- * If rval is non-NULL, set the pointer it contains to
+ * If rval is non-NULL, set the pointer it contains to
* the contents of the token.
*
- * If rlen is non-NULL, set the integer it contains to
+ * If rlen is non-NULL, set the integer it contains to
* the length of the token.
*/
@@ -492,7 +492,7 @@ read_whitespace(int c, struct parse *cfile) {
c = get_char(cfile);
if (c == EOF)
return END_OF_FILE;
- } while (!((c == '\n') && cfile->eol_token) &&
+ } while (!((c == '\n') && cfile->eol_token) &&
isascii(c) && isspace(c));
/*
@@ -956,7 +956,7 @@ intern(char *atom, enum dhcp_token dfv) {
}
break;
case 'e':
- if (isascii (atom [1]) &&
+ if (isascii (atom [1]) &&
tolower((unsigned char)atom[1]) == 'x') {
if (!strcasecmp (atom + 2, "tract-int"))
return EXTRACT_INT;
@@ -1055,15 +1055,15 @@ intern(char *atom, enum dhcp_token dfv) {
}
break;
case 'i':
- if (!strcasecmp(atom+1, "a-na"))
+ if (!strcasecmp(atom+1, "a-na"))
return IA_NA;
- if (!strcasecmp(atom+1, "a-ta"))
+ if (!strcasecmp(atom+1, "a-ta"))
return IA_TA;
- if (!strcasecmp(atom+1, "a-pd"))
+ if (!strcasecmp(atom+1, "a-pd"))
return IA_PD;
- if (!strcasecmp(atom+1, "aaddr"))
+ if (!strcasecmp(atom+1, "aaddr"))
return IAADDR;
- if (!strcasecmp(atom+1, "aprefix"))
+ if (!strcasecmp(atom+1, "aprefix"))
return IAPREFIX;
if (!strcasecmp (atom + 1, "nclude"))
return INCLUDE;
@@ -1352,11 +1352,11 @@ intern(char *atom, enum dhcp_token dfv) {
case 's':
if (!strcasecmp(atom + 1, "cript"))
return SCRIPT;
- if (isascii(atom[1]) &&
+ if (isascii(atom[1]) &&
tolower((unsigned char)atom[1]) == 'e') {
if (!strcasecmp(atom + 2, "arch"))
return SEARCH;
- if (isascii(atom[2]) &&
+ if (isascii(atom[2]) &&
tolower((unsigned char)atom[2]) == 'c') {
if (!strncasecmp(atom + 3, "ond", 3)) {
if (!strcasecmp(atom + 6, "ary"))
@@ -1386,7 +1386,7 @@ intern(char *atom, enum dhcp_token dfv) {
return TOKEN_SERVER;
if (atom[6] == '-') {
if (!strcasecmp(atom + 7,
- "duid"))
+ "duid"))
return SERVER_DUID;
if (!strcasecmp(atom + 7,
"name"))
@@ -1406,7 +1406,7 @@ intern(char *atom, enum dhcp_token dfv) {
return TOKEN_SET;
break;
}
- if (isascii(atom[1]) &&
+ if (isascii(atom[1]) &&
tolower((unsigned char)atom[1]) == 'h') {
if (!strcasecmp(atom + 2, "ared-network"))
return SHARED_NETWORK;
@@ -1414,7 +1414,7 @@ intern(char *atom, enum dhcp_token dfv) {
return SHUTDOWN;
break;
}
- if (isascii(atom[1]) &&
+ if (isascii(atom[1]) &&
tolower((unsigned char)atom[1]) == 'i') {
if (!strcasecmp(atom + 2, "addr"))
return SIADDR;
@@ -1424,9 +1424,9 @@ intern(char *atom, enum dhcp_token dfv) {
return SIZE;
break;
}
- if (isascii(atom[1]) &&
+ if (isascii(atom[1]) &&
tolower((unsigned char)atom[1]) == 'p') {
- if (isascii(atom[2]) &&
+ if (isascii(atom[2]) &&
tolower((unsigned char)atom[2]) == 'a') {
if (!strcasecmp(atom + 3, "ce"))
return SPACE;
@@ -1438,9 +1438,9 @@ intern(char *atom, enum dhcp_token dfv) {
return SPLIT;
break;
}
- if (isascii(atom[1]) &&
+ if (isascii(atom[1]) &&
tolower((unsigned char)atom[1]) == 't') {
- if (isascii(atom[2]) &&
+ if (isascii(atom[2]) &&
tolower((unsigned char)atom[2]) == 'a') {
if(!strncasecmp(atom + 3, "rt", 2)) {
if (!strcasecmp(atom + 5, "s"))
@@ -1473,7 +1473,7 @@ intern(char *atom, enum dhcp_token dfv) {
return SUBSTRING;
break;
}
- if (isascii(atom[1]) &&
+ if (isascii(atom[1]) &&
tolower((unsigned char)atom[1]) == 'u') {
if (!strcasecmp(atom + 2, "ffix"))
return SUFFIX;
@@ -1567,4 +1567,3 @@ intern(char *atom, enum dhcp_token dfv) {
}
return dfv;
}
-
diff --git a/common/ctrace.c b/common/ctrace.c
index 030c68a9..cdf85c4a 100644
--- a/common/ctrace.c
+++ b/common/ctrace.c
@@ -44,7 +44,7 @@ void trace_interface_register (trace_type_t *ttype, struct interface_info *ip)
tipkt.index = htonl (ip -> index);
trace_write_packet (ttype, sizeof tipkt, (char *)&tipkt, MDL);
- }
+ }
}
void trace_interface_input (trace_type_t *ttype, unsigned len, char *buf)
@@ -61,7 +61,7 @@ void trace_interface_input (trace_type_t *ttype, unsigned len, char *buf)
return;
}
tipkt = (trace_interface_packet_t *)buf;
-
+
ip = (struct interface_info *)0;
status = interface_allocate (&ip, MDL);
if (status != ISC_R_SUCCESS) {
@@ -85,7 +85,7 @@ void trace_interface_input (trace_type_t *ttype, unsigned len, char *buf)
ip->address_count = ip->address_max = 1;
ip->addresses = dmalloc(sizeof(*ip->addresses), MDL);
if (!ip->addresses) {
- dfree(ip->ifp, MDL);
+ dfree(ip->ifp, MDL);
ip->ifp = NULL;
interface_dereference (&ip, MDL);
status = ISC_R_NOMEMORY;
@@ -183,7 +183,7 @@ void trace_inpacket_input (trace_type_t *ttype, unsigned len, char *buf)
tip = (trace_inpacket_t *)buf;
index = ntohl (tip -> index);
tip -> from.len = ntohl (tip -> from.len);
-
+
if (index > interface_count ||
index < 0 ||
!interface_vector [index]) {
@@ -259,7 +259,7 @@ void trace_outpacket_input (trace_type_t *ttype, unsigned len, char *buf)
}
tip = (trace_outpacket_t *)buf;
index = ntohl (tip -> index);
-
+
if (index > interface_count ||
index < 0 ||
!interface_vector [index]) {
diff --git a/common/dhcp-eval.5 b/common/dhcp-eval.5
index fa3932fb..fb89adf4 100644
--- a/common/dhcp-eval.5
+++ b/common/dhcp-eval.5
@@ -92,7 +92,7 @@ statement are executed, and all subsequent
.B elsif
and
.B else
-clauses are skipped. Otherwise, each subsequent
+clauses are skipped. Otherwise, each subsequent
.B elsif
clause's expression is checked, until an elsif clause is encountered
whose test evaluates to true. If such a clause is found, the
@@ -101,7 +101,7 @@ subsequent
.B elsif
and
.B else
-clauses are skipped. If all the
+clauses are skipped. If all the
.B if
and
.B elsif
@@ -150,7 +150,7 @@ The
statement and the
.B case
statements can both be data expressions or numeric expressions. Within
-a switch statement they all must be the same type. The server
+a switch statement they all must be the same type. The server
evaluates the expression from the switch statement and then it evaluates
the expressions from the case statements until it finds a match.
.PP
diff --git a/common/dhcp-options.5 b/common/dhcp-options.5
index 1c3f3a6b..a70ce1e0 100644
--- a/common/dhcp-options.5
+++ b/common/dhcp-options.5
@@ -848,7 +848,7 @@ information.
.B option \fBpxe-system-type\fR \fIuint16\fR [\fB, \fIuint16\fR ... ]\fB;\fR
.RS 0.25i
.PP
-A list of one ore more 16-bit integers which allows a client to specify its
+A list of one ore more 16-bit integers which allows a client to specify its
pre-boot architecture type(s).
.PP
This option is included based on RFC 4578.
diff --git a/common/discover.c b/common/discover.c
index 6288850e..1220b061 100644
--- a/common/discover.c
+++ b/common/discover.c
@@ -102,7 +102,7 @@ isc_result_t interface_setup ()
dhcp_interface_destroy,
dhcp_interface_signal_handler,
dhcp_interface_stuff_values,
- dhcp_interface_lookup,
+ dhcp_interface_lookup,
dhcp_interface_create,
dhcp_interface_remove,
0, 0, 0,
@@ -139,11 +139,11 @@ isc_result_t interface_initialize (omapi_object_t *ipo,
}
-/*
+/*
* Scanning for Interfaces
* -----------------------
*
- * To find interfaces, we create an iterator that abstracts out most
+ * To find interfaces, we create an iterator that abstracts out most
* of the platform specifics. Use is fairly straightforward:
*
* - begin_iface_scan() starts the process.
@@ -213,7 +213,7 @@ isc_result_t interface_initialize (omapi_object_t *ipo,
#endif
#if defined(SIOCGLIFCONF) && defined(SIOCGLIFFLAGS)
-/*
+/*
* Solaris support
* ---------------
*
@@ -223,7 +223,7 @@ isc_result_t interface_initialize (omapi_object_t *ipo,
* Solaris' extended interface is documented in the if_tcp man page.
*/
-/*
+/*
* Structure holding state about the scan.
*/
struct iface_conf_list {
@@ -233,7 +233,7 @@ struct iface_conf_list {
int next; /* next interface to retrieve when iterating */
};
-/*
+/*
* Structure used to return information about a specific interface.
*/
struct iface_info {
@@ -242,12 +242,12 @@ struct iface_info {
isc_uint64_t flags; /* interface flags, e.g. IFF_LOOPBACK */
};
-/*
+/*
* Start a scan of interfaces.
*
* The iface_conf_list structure maintains state for this process.
*/
-int
+int
begin_iface_scan(struct iface_conf_list *ifaces) {
#ifdef ISC_PLATFORM_HAVELIFNUM
struct lifnum lifnum;
@@ -308,7 +308,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
/*
* Retrieve the next interface.
*
- * Returns information in the info structure.
+ * Returns information in the info structure.
* Sets err to 1 if there is an error, otherwise 0.
*/
int
@@ -359,11 +359,11 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
foundif = ISC_TRUE;
} while ((foundif == ISC_FALSE) ||
(strncmp(info->name, "dummy", 5) == 0));
-
+
memset(&tmp, 0, sizeof(tmp));
strncpy(tmp.lifr_name, info->name, sizeof(tmp.lifr_name) - 1);
if (ioctl(ifaces->sock, SIOCGLIFFLAGS, &tmp) < 0) {
- log_error("Error getting interface flags for '%s'; %m",
+ log_error("Error getting interface flags for '%s'; %m",
p->lifr_name);
*err = 1;
return 0;
@@ -387,11 +387,11 @@ end_iface_scan(struct iface_conf_list *ifaces) {
#else
-/*
+/*
* BSD/Linux support
* -----------
*
- * FreeBSD, NetBSD, OpenBSD, OS X/macOS and Linux all have the getifaddrs()
+ * FreeBSD, NetBSD, OpenBSD, OS X/macOS and Linux all have the getifaddrs()
* function.
*
* The getifaddrs() man page describes the use.
@@ -399,7 +399,7 @@ end_iface_scan(struct iface_conf_list *ifaces) {
#include <ifaddrs.h>
-/*
+/*
* Structure holding state about the scan.
*/
struct iface_conf_list {
@@ -407,7 +407,7 @@ struct iface_conf_list {
struct ifaddrs *next; /* current position in the list */
};
-/*
+/*
* Structure used to return information about a specific interface.
*/
struct iface_info {
@@ -416,12 +416,12 @@ struct iface_info {
isc_uint64_t flags; /* interface flags, e.g. IFF_LOOPBACK */
};
-/*
+/*
* Start a scan of interfaces.
*
* The iface_conf_list structure maintains state for this process.
*/
-int
+int
begin_iface_scan(struct iface_conf_list *ifaces) {
if (getifaddrs(&ifaces->head) != 0) {
log_error("Error getting interfaces; %m");
@@ -434,7 +434,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
/*
* Retrieve the next interface.
*
- * Returns information in the info structure.
+ * Returns information in the info structure.
* Sets err to 1 if there is an error, otherwise 0.
*/
int
@@ -446,7 +446,7 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
return 0;
}
if (strlen(ifaces->next->ifa_name) >= sizeof(info->name)) {
- log_error("Interface name '%s' too long",
+ log_error("Interface name '%s' too long",
ifaces->next->ifa_name);
*err = 1;
return 0;
@@ -485,11 +485,11 @@ end_iface_scan(struct iface_conf_list *ifaces) {
ifaces->head = NULL;
ifaces->next = NULL;
}
-#endif
+#endif
/* XXX: perhaps create drealloc() rather than do it manually */
void
-add_ipv4_addr_to_interface(struct interface_info *iface,
+add_ipv4_addr_to_interface(struct interface_info *iface,
const struct in_addr *addr) {
/*
* We don't expect a lot of addresses per IPv4 interface, so
@@ -513,8 +513,8 @@ add_ipv4_addr_to_interface(struct interface_info *iface,
log_fatal("Out of memory saving IPv4 address "
"on interface.");
}
- memcpy(tmp,
- iface->addresses,
+ memcpy(tmp,
+ iface->addresses,
iface->address_max * sizeof(struct in_addr));
dfree(iface->addresses, MDL);
iface->addresses = tmp;
@@ -526,7 +526,7 @@ add_ipv4_addr_to_interface(struct interface_info *iface,
#ifdef DHCPv6
/* XXX: perhaps create drealloc() rather than do it manually */
void
-add_ipv6_addr_to_interface(struct interface_info *iface,
+add_ipv6_addr_to_interface(struct interface_info *iface,
const struct in6_addr *addr) {
/*
* Each IPv6 interface will have at least two IPv6 addresses,
@@ -551,8 +551,8 @@ add_ipv6_addr_to_interface(struct interface_info *iface,
log_fatal("Out of memory saving IPv6 address "
"on interface.");
}
- memcpy(tmp,
- iface->v6addresses,
+ memcpy(tmp,
+ iface->v6addresses,
iface->v6address_max * sizeof(struct in6_addr));
dfree(iface->v6addresses, MDL);
iface->v6addresses = tmp;
@@ -567,7 +567,7 @@ add_ipv6_addr_to_interface(struct interface_info *iface,
register that interface with the network I/O software, figure out what
subnet it's on, and add it to the list of interfaces. */
-void
+void
discover_interfaces(int state) {
struct iface_conf_list ifaces;
struct iface_info info;
@@ -637,7 +637,7 @@ discover_interfaces(int state) {
(!(info.flags & IFF_UP) &&
state != DISCOVER_UNCONFIGURED))
continue;
-
+
/* If there isn't already an interface by this name,
allocate one. */
if (tmp == NULL) {
@@ -658,7 +658,7 @@ discover_interfaces(int state) {
(*dhcp_interface_discovery_hook)(tmp);
}
- if ((info.addr.ss_family == AF_INET) &&
+ if ((info.addr.ss_family == AF_INET) &&
(local_family == AF_INET)) {
struct sockaddr_in *a = (struct sockaddr_in*)&info.addr;
struct iaddr addr;
@@ -685,14 +685,14 @@ discover_interfaces(int state) {
}
}
#ifdef DHCPv6
- else if ((info.addr.ss_family == AF_INET6) &&
+ else if ((info.addr.ss_family == AF_INET6) &&
(local_family == AF_INET6)) {
- struct sockaddr_in6 *a =
+ struct sockaddr_in6 *a =
(struct sockaddr_in6*)&info.addr;
struct iaddr addr;
/* We don't want the loopback interface. */
- if (IN6_IS_ADDR_LOOPBACK(&a->sin6_addr) &&
+ if (IN6_IS_ADDR_LOOPBACK(&a->sin6_addr) &&
((tmp->flags & INTERFACE_AUTOMATIC) &&
((state == DISCOVER_SERVER) ||
(state == DISCOVER_SERVER46))))
@@ -809,14 +809,14 @@ discover_interfaces(int state) {
log_error("%s", "");
if (local_family == AF_INET) {
log_error("No subnet declaration for %s (%s).",
- tmp->name,
+ tmp->name,
(tmp->addresses == NULL) ?
"no IPv4 addresses" :
inet_ntoa(tmp->addresses[0]));
#ifdef DHCPv6
} else {
if (tmp->v6addresses != NULL) {
- inet_ntop(AF_INET6,
+ inet_ntop(AF_INET6,
&tmp->v6addresses[0],
abuf,
sizeof(abuf));
@@ -876,7 +876,7 @@ discover_interfaces(int state) {
} else if (tmp->v6address_count > 0) {
subnet->interface_address.len = 16;
memcpy(subnet->interface_address.iabuf,
- &tmp->v6addresses[0].s6_addr,
+ &tmp->v6addresses[0].s6_addr,
16);
} else {
/* XXX: should be one */
@@ -954,7 +954,7 @@ discover_interfaces(int state) {
if (tmp -> rfdesc == -1)
continue;
switch (local_family) {
-#ifdef DHCPv6
+#ifdef DHCPv6
case AF_INET6:
#ifdef RELAY_PORT
#define UPSTREAM(ifp) \
@@ -981,7 +981,7 @@ discover_interfaces(int state) {
}
#endif
status = omapi_register_io_object((omapi_object_t *)tmp,
- if_readsocket,
+ if_readsocket,
0, got_one_v6, 0, 0);
#ifdef RELAY_PORT
if (UPSTREAM(tmp))
@@ -994,7 +994,7 @@ discover_interfaces(int state) {
case AF_INET:
default:
status = omapi_register_io_object((omapi_object_t *)tmp,
- if_readsocket,
+ if_readsocket,
0, got_one, 0, 0);
break;
}
@@ -1194,7 +1194,7 @@ got_one_v6(omapi_object_t *h) {
/*
* If a packet is not multicast, we assume it is unicast.
*/
- if (IN6_IS_ADDR_MULTICAST(&to)) {
+ if (IN6_IS_ADDR_MULTICAST(&to)) {
is_unicast = ISC_FALSE;
} else {
is_unicast = ISC_TRUE;
@@ -1211,8 +1211,8 @@ got_one_v6(omapi_object_t *h) {
if (ip == NULL)
return ISC_R_NOTFOUND;
- (*dhcpv6_packet_handler)(ip, buf,
- result, from.sin6_port,
+ (*dhcpv6_packet_handler)(ip, buf,
+ result, from.sin6_port,
&ifrom, is_unicast);
}
@@ -1252,7 +1252,7 @@ isc_result_t dhcp_interface_set_value (omapi_object_t *h,
if (status == ISC_R_SUCCESS || status == DHCP_R_UNCHANGED)
return status;
}
-
+
return ISC_R_NOTFOUND;
}
@@ -1453,7 +1453,7 @@ isc_result_t dhcp_interface_create (omapi_object_t **lp,
{
struct interface_info *hp;
isc_result_t status;
-
+
hp = (struct interface_info *)0;
status = interface_allocate (&hp, MDL);
if (status != ISC_R_SUCCESS)
diff --git a/common/dispatch.c b/common/dispatch.c
index e019421e..6687ab17 100644
--- a/common/dispatch.c
+++ b/common/dispatch.c
@@ -96,7 +96,7 @@ struct timeval *process_outstanding_timeouts (struct timeval *tvp)
* to the timer and use that. The complications arise in trying to ensure
* that all of the corner cases are covered. The last one is potentially
* more painful and requires more investigation.
- *
+ *
* The plan is continue with the older DHCP calls and timer list. The
* calls will continue to manipulate the list but will also pass a
* timer to the ISC timer code for the actual dispatch. Later, if desired,
@@ -266,7 +266,7 @@ void add_timeout (when, where, what, ref, unref)
sec = when->tv_sec - cur_tv.tv_sec;
usec = when->tv_usec - cur_tv.tv_usec;
-
+
if ((when->tv_usec != 0) && (usec < 0)) {
sec--;
usec += USEC_MAX;
@@ -287,7 +287,7 @@ void add_timeout (when, where, what, ref, unref)
usec = USEC_MAX - 1;
}
- /*
+ /*
* This is necessary for the tracing code but we put it
* here in case we want to compare timing information
* for some reason, like debugging.
diff --git a/common/dlpi.c b/common/dlpi.c
index 7a80eaaf..153aa519 100644
--- a/common/dlpi.c
+++ b/common/dlpi.c
@@ -1,5 +1,5 @@
/* dlpi.c
-
+
Data Link Provider Interface (DLPI) network interface code. */
/*
@@ -160,8 +160,8 @@ static int dlpibindack (int fd, char *bufp);
/* These functions are not used if we're only sourcing the get_hw_addr()
* function (for USE_SOCKETS).
*/
-static int dlpiunitdatareq (int fd, unsigned char *addr, int addrlen,
- unsigned long minpri, unsigned long maxpri,
+static int dlpiunitdatareq (int fd, unsigned char *addr, int addrlen,
+ unsigned long minpri, unsigned long maxpri,
unsigned char *data, int datalen);
static int dlpiunitdataind (int fd,
unsigned char *dstaddr,
@@ -172,7 +172,7 @@ static int dlpiunitdataind (int fd,
unsigned char *data,
int datalen);
#endif /* !USE_DLPI_HWADDR: USE_DLPI_SEND || USE_DLPI_RECEIVE */
-static int expected (unsigned long prim, union DL_primitives *dlp,
+static int expected (unsigned long prim, union DL_primitives *dlp,
int msgflags);
static int strgetmsg (int fd, struct strbuf *ctlp, struct strbuf *datap,
int *flagsp, char *caller);
@@ -214,7 +214,7 @@ int if_register_dlpi (info)
}
/*
- * Submit a DL_INFO_REQ request, to find the dl_mac_type and
+ * Submit a DL_INFO_REQ request, to find the dl_mac_type and
* dl_provider_style
*/
if (dlpiinforeq(sock) < 0 || dlpiinfoack(sock, (char *)buf) < 0) {
@@ -225,7 +225,7 @@ int if_register_dlpi (info)
case DL_ETHER:
info -> hw_address.hbuf [0] = HTYPE_ETHER;
break;
- /* adding token ring 5/1999 - mayer@ping.at */
+ /* adding token ring 5/1999 - mayer@ping.at */
case DL_TPR:
info -> hw_address.hbuf [0] = HTYPE_IEEE802;
break;
@@ -243,10 +243,10 @@ int if_register_dlpi (info)
* assume -2 and ffffff.
*/
info -> dlpi_sap_length = dlp -> info_ack.dl_sap_length;
- info -> dlpi_broadcast_addr.hlen =
+ info -> dlpi_broadcast_addr.hlen =
dlp -> info_ack.dl_brdcst_addr_length;
- memcpy (info -> dlpi_broadcast_addr.hbuf,
- (char *)dlp + dlp -> info_ack.dl_brdcst_addr_offset,
+ memcpy (info -> dlpi_broadcast_addr.hbuf,
+ (char *)dlp + dlp -> info_ack.dl_brdcst_addr_offset,
dlp -> info_ack.dl_brdcst_addr_length);
}
@@ -256,7 +256,7 @@ int if_register_dlpi (info)
* does not exist.
*/
unit = dlpiunit (info -> name);
-
+
if (dlpiattachreq (sock, unit) < 0
|| dlpiokack (sock, (char *)buf) < 0) {
log_fatal ("Can't attach DLPI device for %s: %m", info -> name);
@@ -575,9 +575,9 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
#else
/*
- * Setup the destination address (DLSAP) in dstaddr
+ * Setup the destination address (DLSAP) in dstaddr
*
- * If sap_length < 0 we must deliver the DLSAP as phys+sap.
+ * If sap_length < 0 we must deliver the DLSAP as phys+sap.
* If sap_length > 0 we must deliver the DLSAP as sap+phys.
*
* sap = Service Access Point == ETHERTYPE_IP
@@ -601,11 +601,11 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
if (hto && hto -> hlen == interface -> hw_address.hlen)
memcpy ( phys, (char *) &hto -> hbuf [1], phys_len);
- else
- memcpy ( phys, interface -> dlpi_broadcast_addr.hbuf,
+ else
+ memcpy ( phys, interface -> dlpi_broadcast_addr.hbuf,
interface -> dlpi_broadcast_addr.hlen);
- if (sap_len < 0) {
+ if (sap_len < 0) {
memcpy ( dstaddr, phys, phys_len);
memcpy ( (char *) &dstaddr [phys_len], sap, ABS (sap_len));
}
@@ -640,10 +640,10 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
int offset = 0;
int bufix = 0;
unsigned paylen;
-
+
#ifdef USE_DLPI_RAW
length = read (interface -> rfdesc, dbuf, sizeof (dbuf));
-#else
+#else
length = dlpiunitdataind (interface -> rfdesc, (unsigned char *)NULL,
(unsigned long *)NULL, srcaddr, &srcaddrlen,
(unsigned long *)NULL, dbuf, sizeof (dbuf));
@@ -669,14 +669,14 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
if (hfrom && (srcaddrlen == ABS (sap_len) + phys_len )) {
hfrom -> hbuf [0] = interface -> hw_address.hbuf [0];
hfrom -> hlen = interface -> hw_address.hlen;
-
+
if (sap_len < 0) {
memcpy ((char *) &hfrom -> hbuf [1], srcaddr, phys_len);
}
else {
memcpy((char *)&hfrom->hbuf[1], srcaddr + sap_len, phys_len);
}
- }
+ }
else if (hfrom) {
memset (hfrom, '\0', sizeof *hfrom);
}
@@ -733,11 +733,11 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
* Based largely in part to the example code contained in the document
* "How to Use the STREAMS Data Link Provider Interface (DLPI)", written
* by Neal Nuckolls of SunSoft Internet Engineering.
- *
+ *
* This code has been developed and tested on sparc-based machines running
* SunOS 5.5.1, with le and hme network interfaces. It should be pretty
* generic, though.
- *
+ *
* The usual disclaimers apply. This code works for me. Don't blame me
* if it makes your machine or network go down in flames. That taken
* into consideration, use this code as you wish. If you make usefull
@@ -756,24 +756,24 @@ static int dlpiunit (ifname)
{
char *cp;
int unit;
-
+
if (!ifname) {
return 0;
}
-
+
/* Advance to the end of the name */
cp = ifname;
while (*cp) cp++;
/* Back up to the start of the first digit */
while ((*(cp-1) >= '0' && *(cp-1) <= '9') || *(cp - 1) == ':') cp--;
-
+
/* Convert the unit number */
unit = 0;
while (*cp >= '0' && *cp <= '9') {
unit *= 10;
unit += (*cp++ - '0');
}
-
+
return unit;
}
@@ -785,11 +785,11 @@ dlpiopen(const char *ifname) {
char devname [50];
char *dp;
const char *cp, *ep;
-
+
if (!ifname) {
return -1;
}
-
+
/* Open a DLPI device */
if (*ifname == '/') {
dp = devname;
@@ -810,13 +810,13 @@ dlpiopen(const char *ifname) {
while ((*(ep - 1) >= '0' && *(ep - 1) <= '9') || *(ep - 1) == ':')
ep--;
#endif
-
+
/* Copy everything up to the unit number */
while (cp < ep) {
*dp++ = *cp++;
}
*dp = '\0';
-
+
return open (devname, O_RDWR, 0);
}
@@ -830,15 +830,15 @@ static int dlpiinforeq (fd)
dl_info_req_t info_req;
struct strbuf ctl;
int flags;
-
+
info_req.dl_primitive = DL_INFO_REQ;
-
+
ctl.maxlen = 0;
ctl.len = sizeof (info_req);
ctl.buf = (char *)&info_req;
-
+
flags = RS_HIPRI;
-
+
return putmsg (fd, &ctl, (struct strbuf *)NULL, flags);
}
@@ -852,16 +852,16 @@ static int dlpiphysaddrreq (fd, addrtype)
dl_phys_addr_req_t physaddr_req;
struct strbuf ctl;
int flags;
-
+
physaddr_req.dl_primitive = DL_PHYS_ADDR_REQ;
physaddr_req.dl_addr_type = addrtype;
-
+
ctl.maxlen = 0;
ctl.len = sizeof (physaddr_req);
ctl.buf = (char *)&physaddr_req;
-
+
flags = RS_HIPRI;
-
+
return putmsg (fd, &ctl, (struct strbuf *)NULL, flags);
}
@@ -875,16 +875,16 @@ static int dlpiattachreq (fd, ppa)
dl_attach_req_t attach_req;
struct strbuf ctl;
int flags;
-
+
attach_req.dl_primitive = DL_ATTACH_REQ;
attach_req.dl_ppa = ppa;
-
+
ctl.maxlen = 0;
ctl.len = sizeof (attach_req);
ctl.buf = (char *)&attach_req;
-
+
flags = 0;
-
+
return putmsg (fd, &ctl, (struct strbuf*)NULL, flags);
}
@@ -902,20 +902,20 @@ static int dlpibindreq (fd, sap, max_conind, service_mode, conn_mgmt, xidtest)
dl_bind_req_t bind_req;
struct strbuf ctl;
int flags;
-
+
bind_req.dl_primitive = DL_BIND_REQ;
bind_req.dl_sap = sap;
bind_req.dl_max_conind = max_conind;
bind_req.dl_service_mode = service_mode;
bind_req.dl_conn_mgmt = conn_mgmt;
bind_req.dl_xidtest_flg = xidtest;
-
+
ctl.maxlen = 0;
ctl.len = sizeof (bind_req);
ctl.buf = (char *)&bind_req;
-
+
flags = 0;
-
+
return putmsg (fd, &ctl, (struct strbuf*)NULL, flags);
}
@@ -931,15 +931,15 @@ static int dlpiunbindreq (fd)
dl_unbind_req_t unbind_req;
struct strbuf ctl;
int flags;
-
+
unbind_req.dl_primitive = DL_UNBIND_REQ;
-
+
ctl.maxlen = 0;
ctl.len = sizeof (unbind_req);
ctl.buf = (char *)&unbind_req;
-
+
flags = 0;
-
+
return putmsg (fd, &ctl, (struct strbuf*)NULL, flags);
}
@@ -955,15 +955,15 @@ static int dlpidetachreq (fd)
dl_detach_req_t detach_req;
struct strbuf ctl;
int flags;
-
+
detach_req.dl_primitive = DL_DETACH_REQ;
-
+
ctl.maxlen = 0;
ctl.len = sizeof (detach_req);
ctl.buf = (char *)&detach_req;
-
+
flags = 0;
-
+
return putmsg (fd, &ctl, (struct strbuf*)NULL, flags);
}
#endif /* UNUSED_DLPI_INTERFACE */
@@ -979,7 +979,7 @@ static int dlpibindack (fd, bufp)
union DL_primitives *dlp;
struct strbuf ctl;
int flags;
-
+
ctl.maxlen = DLPI_MAXDLBUF;
ctl.len = 0;
ctl.buf = bufp;
@@ -988,13 +988,13 @@ static int dlpibindack (fd, bufp)
(struct strbuf*)NULL, &flags, "dlpibindack") < 0) {
return -1;
}
-
+
dlp = (union DL_primitives *)ctl.buf;
-
+
if (expected (DL_BIND_ACK, dlp, flags) == -1) {
return -1;
}
-
+
if (ctl.len < sizeof (dl_bind_ack_t)) {
/* Returned structure is too short */
return -1;
@@ -1013,27 +1013,27 @@ static int dlpiokack (fd, bufp)
union DL_primitives *dlp;
struct strbuf ctl;
int flags;
-
+
ctl.maxlen = DLPI_MAXDLBUF;
ctl.len = 0;
ctl.buf = bufp;
-
+
if (strgetmsg (fd, &ctl,
(struct strbuf*)NULL, &flags, "dlpiokack") < 0) {
return -1;
}
-
+
dlp = (union DL_primitives *)ctl.buf;
-
+
if (expected (DL_OK_ACK, dlp, flags) == -1) {
return -1;
}
-
+
if (ctl.len < sizeof (dl_ok_ack_t)) {
/* Returned structure is too short */
return -1;
}
-
+
return 0;
}
@@ -1047,27 +1047,27 @@ static int dlpiinfoack (fd, bufp)
union DL_primitives *dlp;
struct strbuf ctl;
int flags;
-
+
ctl.maxlen = DLPI_MAXDLBUF;
ctl.len = 0;
ctl.buf = bufp;
-
+
if (strgetmsg (fd, &ctl, (struct strbuf *)NULL, &flags,
"dlpiinfoack") < 0) {
return -1;
}
-
+
dlp = (union DL_primitives *) ctl.buf;
-
+
if (expected (DL_INFO_ACK, dlp, flags) == -1) {
return -1;
}
-
+
if (ctl.len < sizeof (dl_info_ack_t)) {
/* Returned structure is too short */
return -1;
}
-
+
return 0;
}
@@ -1081,18 +1081,18 @@ int dlpiphysaddrack (fd, bufp)
union DL_primitives *dlp;
struct strbuf ctl;
int flags;
-
+
ctl.maxlen = DLPI_MAXDLBUF;
ctl.len = 0;
ctl.buf = bufp;
-
+
if (strgetmsg (fd, &ctl, (struct strbuf *)NULL, &flags,
"dlpiphysaddrack") < 0) {
return -1;
}
dlp = (union DL_primitives *)ctl.buf;
-
+
if (expected (DL_PHYS_ADDR_ACK, dlp, flags) == -1) {
return -1;
}
@@ -1101,7 +1101,7 @@ int dlpiphysaddrack (fd, bufp)
/* Returned structure is too short */
return -1;
}
-
+
return 0;
}
@@ -1118,7 +1118,7 @@ int dlpiunitdatareq (fd, addr, addrlen, minpri, maxpri, dbuf, dbuflen)
long buf [DLPI_MAXDLBUF];
union DL_primitives *dlp;
struct strbuf ctl, data;
-
+
/* Set up the control information... */
dlp = (union DL_primitives *)buf;
dlp -> unitdata_req.dl_primitive = DL_UNITDATA_REQ;
@@ -1130,7 +1130,7 @@ int dlpiunitdatareq (fd, addr, addrlen, minpri, maxpri, dbuf, dbuflen)
/* Append the destination address */
memcpy ((char *)buf + dlp -> unitdata_req.dl_dest_addr_offset,
addr, addrlen);
-
+
ctl.maxlen = 0;
ctl.len = dlp -> unitdata_req.dl_dest_addr_offset + addrlen;
ctl.buf = (char *)buf;
@@ -1233,7 +1233,7 @@ static int expected (prim, dlp, msgflags)
/* Incorrect/unexpected return message */
return -1;
}
-
+
return 0;
}
@@ -1252,7 +1252,7 @@ static int strgetmsg (fd, ctlp, datap, flagsp, caller)
time_t now;
time_t starttime;
int to_msec;
-
+
pfd.fd = fd;
pfd.events = POLLPRI; /* We're only interested in knowing
* when we can receive the next high
@@ -1264,7 +1264,7 @@ static int strgetmsg (fd, ctlp, datap, flagsp, caller)
while (now <= starttime + DLPI_MAXWAIT) {
to_msec = ((starttime + DLPI_MAXWAIT) - now) * 1000;
count = poll (&pfd, 1, to_msec);
-
+
if (count == 0) {
/* log_fatal ("strgetmsg: timeout"); */
return -1;
@@ -1342,7 +1342,7 @@ void maybe_setup_fallback ()
}
#endif /* USE_DLPI_SEND */
-void
+void
get_hw_addr(const char *name, struct hardware *hw) {
int sock, unit;
long buf[DLPI_MAXDLBUF];
@@ -1350,7 +1350,7 @@ get_hw_addr(const char *name, struct hardware *hw) {
dlp = (union DL_primitives *)buf;
- /*
+ /*
* Open a DLPI device.
*/
sock = dlpiopen(name);
@@ -1359,7 +1359,7 @@ get_hw_addr(const char *name, struct hardware *hw) {
}
/*
- * Submit a DL_INFO_REQ request, to find the dl_mac_type and
+ * Submit a DL_INFO_REQ request, to find the dl_mac_type and
* dl_provider_style
*/
if (dlpiinforeq(sock) < 0) {
@@ -1411,12 +1411,12 @@ get_hw_addr(const char *name, struct hardware *hw) {
name);
}
if (dlp->physaddr_ack.dl_addr_length < sizeof(hw->hbuf)) {
- memcpy(hw->hbuf+1,
+ memcpy(hw->hbuf+1,
(char *)buf + dlp->physaddr_ack.dl_addr_offset,
dlp->physaddr_ack.dl_addr_length);
hw->hlen = dlp->physaddr_ack.dl_addr_length + 1;
} else {
- memcpy(hw->hbuf+1,
+ memcpy(hw->hbuf+1,
(char *)buf + dlp->physaddr_ack.dl_addr_offset,
sizeof(hw->hbuf)-1);
hw->hlen = sizeof(hw->hbuf);
diff --git a/common/execute.c b/common/execute.c
index 053dab81..5f285377 100644
--- a/common/execute.c
+++ b/common/execute.c
@@ -167,7 +167,7 @@ int execute_statements (result, packet, lease, client_state,
(&rc, packet,
lease, client_state, in_options,
out_options, scope, r->data.ie.expr));
-
+
#if defined (DEBUG_EXPRESSIONS)
log_debug ("exec: if %s", (status
? (rc ? "true" : "false")
@@ -219,7 +219,7 @@ int execute_statements (result, packet, lease, client_state,
}
log_debug("execute_statement argv[0] = %s", argv[0]);
-
+
for (i = 1, expr = r->data.execute.arglist; expr;
expr = expr->data.arg.next, i++) {
memset (&ds, 0, sizeof(ds));
@@ -509,7 +509,7 @@ int execute_statements (result, packet, lease, client_state,
(&ds, packet,
lease, client_state, in_options,
out_options, scope, r->data.log.expr, MDL));
-
+
#if defined (DEBUG_EXPRESSIONS)
log_debug ("exec: log");
#endif
@@ -936,7 +936,7 @@ void write_statements (file, statements, indent)
token_indent_data_string
(file, col, indent + 8, "", "",
&r -> data.option -> data);
-
+
fprintf (file, ";"); /* XXX */
break;
@@ -952,7 +952,7 @@ void write_statements (file, statements, indent)
(void) token_print_indent (file, col, indent + 4,
" ", "", ";");
break;
-
+
case unset_statement:
indent_spaces (file, indent);
fprintf (file, "unset ");
@@ -1021,7 +1021,7 @@ void write_statements (file, statements, indent)
"is not defined).", MDL);
#endif /* ENABLE_EXECUTE */
break;
-
+
case vendor_opt_statement:
indent_spaces (file, indent);
fprintf (file, "parse-vendor-option;");
diff --git a/common/fddi.c b/common/fddi.c
index a6c8098b..16ac2da7 100644
--- a/common/fddi.c
+++ b/common/fddi.c
@@ -77,7 +77,7 @@ ssize_t decode_fddi_header (interface, buf, bufix, from)
{
struct fddi_header fh;
struct llc lh;
-
+
from -> hbuf [0] = HTYPE_FDDI;
memcpy (&from -> hbuf [1], fh.fddi_shost, sizeof fh.fddi_shost);
return FDDI_HEADER_SIZE + LLC_SNAP_LEN;
diff --git a/common/icmp.c b/common/icmp.c
index 8c87aaa1..cdf92a37 100644
--- a/common/icmp.c
+++ b/common/icmp.c
@@ -85,7 +85,7 @@ void icmp_startup (routep, handler)
proto = getprotobyname ("icmp");
if (proto)
protocol = proto -> p_proto;
-
+
/* Get a raw socket for the ICMP protocol. */
icmp_state -> socket = socket (AF_INET, SOCK_RAW, protocol);
if (icmp_state -> socket < 0) {
diff --git a/common/inet.c b/common/inet.c
index 4388d92b..dcb628ce 100644
--- a/common/inet.c
+++ b/common/inet.c
@@ -101,7 +101,7 @@ struct iaddr ip_addr (subnet, mask, host_address)
} else
rv.iabuf [i + j] = habuf [i];
}
-
+
return rv;
}
@@ -174,7 +174,7 @@ int addr_eq (addr1, addr2)
return memcmp (addr1.iabuf, addr2.iabuf, addr1.len) == 0;
}
-/* addr_match
+/* addr_match
*
* compares an IP address against a network/mask combination
* by ANDing the IP with the mask and seeing whether the result
@@ -189,7 +189,7 @@ addr_match(addr, match)
if (addr->len != match->addr.len)
return 0;
-
+
for (i = 0 ; i < addr->len ; i++) {
if ((addr->iabuf[i] & match->mask.iabuf[i]) !=
match->addr.iabuf[i])
@@ -198,7 +198,7 @@ addr_match(addr, match)
return 1;
}
-/*
+/*
* Compares the addresses a1 and a2.
*
* If a1 < a2, returns -1.
@@ -234,7 +234,7 @@ addr_cmp(const struct iaddr *a1, const struct iaddr *a2) {
*
* WARNING: if a1 and a2 differ in length, returns 0.
*/
-int
+int
addr_or(struct iaddr *result, const struct iaddr *a1, const struct iaddr *a2) {
int i;
int all_zero;
@@ -263,7 +263,7 @@ addr_or(struct iaddr *result, const struct iaddr *a1, const struct iaddr *a2) {
*
* WARNING: if a1 and a2 differ in length, returns 0.
*/
-int
+int
addr_and(struct iaddr *result, const struct iaddr *a1, const struct iaddr *a2) {
int i;
int all_zero;
@@ -323,7 +323,7 @@ is_cidr_mask_valid(const struct iaddr *addr, int bits) {
zero_bits = (addr->len * 8) - bits;
zero_bytes = zero_bits / 8;
- /*
+ /*
* Check to make sure the low-order bytes are zero.
*/
for (i=1; i<=zero_bytes; i++) {
@@ -332,11 +332,11 @@ is_cidr_mask_valid(const struct iaddr *addr, int bits) {
}
}
- /*
- * Look to see if any bits not in right-hand bytes are
- * non-zero, by making a byte that has these bits set to zero
- * comparing to the original byte. If these two values are
- * equal, then the right-hand bits are zero, and we are
+ /*
+ * Look to see if any bits not in right-hand bytes are
+ * non-zero, by making a byte that has these bits set to zero
+ * comparing to the original byte. If these two values are
+ * equal, then the right-hand bits are zero, and we are
* happy.
*/
shift_bits = zero_bits % 8;
@@ -350,14 +350,14 @@ is_cidr_mask_valid(const struct iaddr *addr, int bits) {
*
* Converts a range of IP addresses to a set of CIDR networks.
*
- * Examples:
+ * Examples:
* 192.168.0.0 - 192.168.0.255 = 192.168.0.0/24
* 10.0.0.0 - 10.0.1.127 = 10.0.0.0/24, 10.0.1.0/25
* 255.255.255.32 - 255.255.255.255 = 255.255.255.32/27, 255.255.255.64/26,
* 255.255.255.128/25
*/
-isc_result_t
-range2cidr(struct iaddrcidrnetlist **result,
+isc_result_t
+range2cidr(struct iaddrcidrnetlist **result,
const struct iaddr *lo, const struct iaddr *hi) {
struct iaddr addr;
struct iaddr mask;
@@ -395,30 +395,30 @@ range2cidr(struct iaddrcidrnetlist **result,
* Start at the low end, and keep trying larger networks
* until we get one that is too big (explained below).
*
- * We keep a "mask", which is the ones-complement of a
+ * We keep a "mask", which is the ones-complement of a
* normal netmask. So, a /23 has a netmask of 255.255.254.0,
* and a mask of 0.0.1.255.
*
- * We know when a network is too big when we bitwise-AND the
- * mask with the starting address and we get a non-zero
+ * We know when a network is too big when we bitwise-AND the
+ * mask with the starting address and we get a non-zero
* result, like this:
*
* addr: 192.168.1.0, mask: 0.0.1.255
* bitwise-AND: 0.0.1.0
- *
+ *
* A network is also too big if the bitwise-OR of the mask
* with the starting address is larger than the end address,
* like this:
*
* start: 192.168.1.0, mask: 0.0.1.255, end: 192.168.0.255
- * bitwise-OR: 192.168.1.255
+ * bitwise-OR: 192.168.1.255
*
* -------------------
- * Once we have found a network that is too big, we add the
+ * Once we have found a network that is too big, we add the
* appropriate CIDR network to our list of found networks.
*
* We then use the next IP address as our low address, and
- * begin the process of searching for a network that is
+ * begin the process of searching for a network that is
* too big again, starting with an empty mask.
*/
addr = *lo;
@@ -435,12 +435,12 @@ range2cidr(struct iaddrcidrnetlist **result,
mask.iabuf[ofs] |= val;
}
- /*
+ /*
* See if we're too big, and save this network if so.
*/
addr_or(&end_addr, &addr, &mask);
if ((ofs < 0) ||
- (addr_cmp(&end_addr, hi) > 0) ||
+ (addr_cmp(&end_addr, hi) > 0) ||
addr_and(&dummy, &addr, &mask)) {
/*
* Add a new prefix to our list.
@@ -459,8 +459,8 @@ range2cidr(struct iaddrcidrnetlist **result,
net->next = *result;
*result = net;
- /*
- * Figure out our new starting address,
+ /*
+ * Figure out our new starting address,
* by adding (1 << bit) to our previous
* starting address.
*/
@@ -534,7 +534,7 @@ piaddr(const struct iaddr addr) {
}
if (addr.len == 4) {
return inet_ntop(AF_INET, addr.iabuf, pbuf, sizeof(pbuf));
- }
+ }
if (addr.len == 16) {
return inet_ntop(AF_INET6, addr.iabuf, pbuf, sizeof(pbuf));
}
@@ -610,7 +610,7 @@ validate_port(char *port) {
errno = 0;
local_port = strtol(port, &endptr, 10);
-
+
if ((*endptr != '\0') || (errno == ERANGE) || (errno == EINVAL))
log_fatal ("Invalid port number specification: %s", port);
@@ -636,7 +636,7 @@ validate_port_pair(char *port) {
errno = 0;
local_port = strtol(port, &endptr, 10);
-
+
if ((*endptr != '\0') || (errno == ERANGE) || (errno == EINVAL))
log_fatal ("Invalid port pair specification: %s", port);
diff --git a/common/lpf.c b/common/lpf.c
index 1e4deff6..e66e3ad4 100644
--- a/common/lpf.c
+++ b/common/lpf.c
@@ -307,7 +307,7 @@ static void lpf_tr_filter_setup (info)
/* Patch the server port into the LPF program...
XXX changes to filter program may require changes
XXX to the insn number(s) used below!
- XXX Token ring filter is null - when/if we have a filter
+ XXX Token ring filter is null - when/if we have a filter
XXX that's not, we'll need this code.
XXX dhcp_bpf_filter [?].k = ntohs (local_port); */
@@ -539,7 +539,7 @@ get_hw_addr(const char *name, struct hardware *hw) {
memset(&tmp, 0, sizeof(tmp));
strcpy(tmp.ifr_name, name);
if (ioctl(sock, SIOCGIFHWADDR, &tmp) < 0) {
- log_fatal("Error getting hardware address for \"%s\": %m",
+ log_fatal("Error getting hardware address for \"%s\": %m",
name);
}
diff --git a/common/ns_name.c b/common/ns_name.c
index 5abb12a7..f4eda437 100644
--- a/common/ns_name.c
+++ b/common/ns_name.c
@@ -491,7 +491,7 @@ cleanup:
*lpp = NULL;
errno = EMSGSIZE;
return (-1);
- }
+ }
return (dstp - dst);
}
@@ -509,7 +509,7 @@ MRns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src,
{
u_char tmp[NS_MAXCDNAME];
int n;
-
+
if ((n = MRns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
return (-1);
if (MRns_name_ntop(tmp, dst, dstsiz) == -1)
diff --git a/common/options.c b/common/options.c
index cbce4e24..f4e86cf5 100644
--- a/common/options.c
+++ b/common/options.c
@@ -1905,7 +1905,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
}
hunksize += k;
break;
-
+
case 't':
case 'k':
fmtbuf[l + 1] = 0;
diff --git a/common/packet.c b/common/packet.c
index 726d51e5..63b4ff8e 100644
--- a/common/packet.c
+++ b/common/packet.c
@@ -61,7 +61,7 @@ u_int32_t checksum (buf, nbytes, sum)
/* Add carry. */
if (sum > 0xFFFF)
sum -= 0xFFFF;
- }
+ }
/* If there's a single byte left over, checksum it, too. Network
byte order is big-endian, so the remaining byte is the high byte. */
@@ -74,7 +74,7 @@ u_int32_t checksum (buf, nbytes, sum)
if (sum > 0xFFFF)
sum -= 0xFFFF;
}
-
+
return sum;
}
@@ -91,7 +91,7 @@ u_int32_t wrapsum (sum)
#ifdef DEBUG_CHECKSUM_VERBOSE
log_debug ("sum = %x", sum);
#endif
-
+
#ifdef DEBUG_CHECKSUM
log_debug ("wrapsum returns %x", htons (sum));
#endif
@@ -156,10 +156,10 @@ void assemble_udp_ip_header (interface, buf, bufix,
ip.ip_sum = 0;
ip.ip_src.s_addr = from;
ip.ip_dst.s_addr = to;
-
+
/* Checksum the IP header... */
ip.ip_sum = wrapsum (checksum ((unsigned char *)&ip, sizeof ip, 0));
-
+
/* Copy the ip header into the buffer... */
memcpy (&buf [*bufix], &ip, sizeof ip);
*bufix += sizeof ip;
@@ -181,7 +181,7 @@ void assemble_udp_ip_header (interface, buf, bufix,
udp.uh_sum =
wrapsum (checksum ((unsigned char *)&udp, sizeof udp,
- checksum (data, len,
+ checksum (data, len,
checksum ((unsigned char *)
&ip.ip_src,
2 * sizeof ip.ip_src,
diff --git a/common/parse.c b/common/parse.c
index 1daedc0b..e884ba32 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -93,7 +93,7 @@ void skip_to_semi (cfile)
statement foo bar { }
statement foo bar { statement { } }
statement}
-
+
...et cetera. */
void skip_to_rbrace (cfile, brace_count)
struct parse *cfile;
@@ -203,7 +203,7 @@ char *parse_host_name (cfile)
char *t;
pair c = (pair)0;
int ltid = 0;
-
+
/* Read a dotted hostname... */
do {
/* Read a token, which should be an identifier. */
@@ -256,7 +256,7 @@ char *parse_host_name (cfile)
/* ip-addr-or-hostname :== ip-address | hostname
ip-address :== NUMBER DOT NUMBER DOT NUMBER DOT NUMBER
-
+
Parse an ip address or a hostname. If uniform is zero, put in
an expr_substring node to limit hostnames that evaluate to more
than one IP address.
@@ -327,8 +327,8 @@ int parse_ip_addr_or_hostname (expr, cfile, uniform)
}
return 1;
-}
-
+}
+
/*
* ip-address :== NUMBER DOT NUMBER DOT NUMBER DOT NUMBER
*/
@@ -342,7 +342,7 @@ int parse_ip_addr (cfile, addr)
&addr -> len, DOT, 10, 8))
return 1;
return 0;
-}
+}
/*
* Return true if every character in the string is hexadecimal.
@@ -363,7 +363,7 @@ is_hex_string(const char *s) {
*
* See section 2.2 of RFC 1884 for details.
*
- * We are lazy for this. We pull numbers, names, colons, and dots
+ * We are lazy for this. We pull numbers, names, colons, and dots
* together and then throw the resulting string at the inet_pton()
* function.
*/
@@ -378,7 +378,7 @@ parse_ip6_addr(struct parse *cfile, struct iaddr *addr) {
int v6_len;
/*
- * First token is non-raw. This way we eat any whitespace before
+ * First token is non-raw. This way we eat any whitespace before
* our IPv6 address begins, like one would expect.
*/
token = peek_token(&val, NULL, cfile);
@@ -425,11 +425,11 @@ parse_ip6_addr(struct parse *cfile, struct iaddr *addr) {
}
/*
- * Same as parse_ip6_addr() above, but returns the value in the
+ * Same as parse_ip6_addr() above, but returns the value in the
* expression rather than in an address structure.
*/
int
-parse_ip6_addr_expr(struct expression **expr,
+parse_ip6_addr_expr(struct expression **expr,
struct parse *cfile) {
struct iaddr addr;
@@ -539,7 +539,7 @@ parse_ip_addr_with_subnet(cfile, match)
match->mask.iabuf[fflen] =
"\x00\x80\xc0\xe0\xf0\xf8\xfc\xfe"[prefixlen % 8];
- memset(match->mask.iabuf+fflen+1, 0x00,
+ memset(match->mask.iabuf+fflen+1, 0x00,
match->mask.len - fflen - 1);
/* AND-out insignificant bits from supplied netmask. */
@@ -569,7 +569,7 @@ parse_ip_addr_with_subnet(cfile, match)
parse_warn(cfile,
"expecting ip-address or ip-address/prefixlen");
- return 0; /* let caller pick up pieces */
+ return 0; /* let caller pick up pieces */
}
/*
@@ -643,7 +643,7 @@ void parse_hardware_param (cfile, hardware)
(sizeof(hardware->hbuf)) - hlen - 1);
dfree(t, MDL);
}
-
+
out:
token = next_token(&val, NULL, cfile);
if (token != SEMI) {
@@ -922,9 +922,9 @@ void convert_num (cfile, buf, str, base, size)
}
/*
- * date :== NUMBER NUMBER SLASH NUMBER SLASH NUMBER
+ * date :== NUMBER NUMBER SLASH NUMBER SLASH NUMBER
* NUMBER COLON NUMBER COLON NUMBER |
- * NUMBER NUMBER SLASH NUMBER SLASH NUMBER
+ * NUMBER NUMBER SLASH NUMBER SLASH NUMBER
* NUMBER COLON NUMBER COLON NUMBER NUMBER |
* EPOCH NUMBER |
* NEVER
@@ -939,7 +939,7 @@ void convert_num (cfile, buf, str, base, size)
* just parse the date
* any trailing semi must be consumed by the caller of this routine
*/
-TIME
+TIME
parse_date_core(cfile)
struct parse *cfile;
{
@@ -1021,7 +1021,7 @@ parse_date_core(cfile)
parse_warn(cfile, "numeric month expected.");
return((TIME)0);
}
- skip_token(&val, NULL, cfile); /* consume month */
+ skip_token(&val, NULL, cfile); /* consume month */
mon = atoi(val) - 1;
/* Slash separating month from day... */
@@ -1149,7 +1149,7 @@ parse_date_core(cfile)
* :== date semi
*/
-TIME
+TIME
parse_date(cfile)
struct parse *cfile;
{
@@ -1551,7 +1551,7 @@ int parse_option_code_definition (cfile, option)
char *s;
int has_encapsulation = 0;
struct universe *encapsulated;
-
+
/* Parse the option code. */
token = next_token (&val, (unsigned *)0, cfile);
if (token != NUMBER) {
@@ -1845,7 +1845,7 @@ int parse_option_code_definition (cfile, option)
/* INSIST(tokbuf[0] == 'E'); */
/* INSIST(encapsulated != NULL); */
if (!option_code_hash_lookup(&encapsulated->enc_opt,
- option->universe->code_hash,
+ option->universe->code_hash,
&option->code, 0, MDL)) {
log_fatal("error finding encapsulated option (%s:%d)",
MDL);
@@ -1884,7 +1884,7 @@ int parse_base64 (data, cfile)
int cc = 0;
int terminated = 0;
int valid_base64;
-
+
/* It's possible for a + or a / to cause a base64 quantity to be
tokenized into more than one token, so we have to parse them all
in before decoding. */
@@ -1925,7 +1925,7 @@ int parse_base64 (data, cfile)
data->data = NULL;
goto out;
}
-
+
j = k = 0;
for (t = bufs; t; t = t->next) {
for (i = 0; t->string[i]; i++) {
@@ -1959,7 +1959,7 @@ int parse_base64 (data, cfile)
data->buffer->data[j++] = (acc >> 4);
acc = acc & 0x0f;
break;
-
+
case 2:
data->buffer->data[j++] = (acc >> 2);
acc = acc & 0x03;
@@ -2057,7 +2057,7 @@ int parse_cshl (data, cfile)
dfree (sl, MDL);
sl = next;
}
-
+
memcpy (rvp, ibuf, ilen);
return 1;
}
@@ -2275,7 +2275,7 @@ int parse_executable_statement (result, cfile, lose, case_context)
case ON:
skip_token(&val, (unsigned *)0, cfile);
return parse_on_statement (result, cfile, lose);
-
+
case SWITCH:
skip_token(&val, (unsigned *)0, cfile);
return parse_switch_statement (result, cfile, lose);
@@ -2297,7 +2297,7 @@ int parse_executable_statement (result, cfile, lose, case_context)
if (case_context == context_any) {
parse_warn (cfile, "switch default statement in %s",
"inappropriate scope.");
-
+
*lose = 1;
return 0;
} else {
@@ -2306,7 +2306,7 @@ int parse_executable_statement (result, cfile, lose, case_context)
(*result) -> op = default_statement;
return 1;
}
-
+
case DEFINE:
case TOKEN_SET:
skip_token(&val, (unsigned *)0, cfile);
@@ -2701,7 +2701,7 @@ int parse_executable_statement (result, cfile, lose, case_context)
}
dns_zone_dereference (&zone, MDL);
return 1;
-
+
/* Also not really a statement, but same idea as above. */
case KEY:
skip_token(&val, (unsigned *)0, cfile);
@@ -2803,7 +2803,7 @@ int parse_zone (struct dns_zone *zone, struct parse *cfile)
log_fatal ("can't allocate primary option cache.");
oc = zone -> primary;
goto consemup;
-
+
case SECONDARY:
if (zone -> secondary) {
parse_warn (cfile, "more than one secondary.");
@@ -2932,7 +2932,7 @@ int parse_zone (struct dns_zone *zone, struct parse *cfile)
if (!parse_semi(cfile))
return (0);
break;
-
+
default:
done = 1;
break;
@@ -3121,15 +3121,15 @@ int parse_on_statement (result, cfile, lose)
case EXPIRY:
(*result) -> data.on.evtypes |= ON_EXPIRY;
break;
-
+
case COMMIT:
(*result) -> data.on.evtypes |= ON_COMMIT;
break;
-
+
case RELEASE:
(*result) -> data.on.evtypes |= ON_RELEASE;
break;
-
+
case TRANSMISSION:
(*result) -> data.on.evtypes |= ON_TRANSMISSION;
break;
@@ -3143,7 +3143,7 @@ int parse_on_statement (result, cfile, lose)
}
token = next_token (&val, (unsigned *)0, cfile);
} while (token == OR);
-
+
/* Semicolon means no statements. */
if (token == SEMI)
return 1;
@@ -3419,7 +3419,7 @@ int parse_if_statement (result, cfile, lose)
}
} else
(*result) -> data.ie.fc = (struct executable_statement *)0;
-
+
return 1;
}
@@ -3433,7 +3433,7 @@ int parse_if_statement (result, cfile, lose)
* boolean-expression OR boolean-expression
* EXISTS OPTION-NAME
*/
-
+
int parse_boolean_expression (expr, cfile, lose)
struct expression **expr;
struct parse *cfile;
@@ -3485,7 +3485,7 @@ int parse_boolean (cfile)
* data_expression :== SUBSTRING LPAREN data-expression COMMA
* numeric-expression COMMA
* numeric-expression RPAREN |
- * CONCAT LPAREN data-expression COMMA
+ * CONCAT LPAREN data-expression COMMA
* data-expression RPAREN
* SUFFIX LPAREN data_expression COMMA
* numeric-expression RPAREN |
@@ -4053,7 +4053,7 @@ int parse_non_binary (expr, cfile, lose, context)
if (token != RPAREN)
goto norparen;
break;
-
+
case STRING:
skip_token(&val, &len, cfile);
if (!make_const_data (expr, (const unsigned char *)val,
@@ -4062,7 +4062,7 @@ int parse_non_binary (expr, cfile, lose, context)
break;
case EXTRACT_INT:
- skip_token(&val, (unsigned *)0, cfile);
+ skip_token(&val, (unsigned *)0, cfile);
token = next_token (&val, (unsigned *)0, cfile);
if (token != LPAREN) {
parse_warn (cfile, "left parenthesis expected.");
@@ -4130,9 +4130,9 @@ int parse_non_binary (expr, cfile, lose, context)
return 0;
}
break;
-
+
case ENCODE_INT:
- skip_token(&val, (unsigned *)0, cfile);
+ skip_token(&val, (unsigned *)0, cfile);
token = next_token (&val, (unsigned *)0, cfile);
if (token != LPAREN) {
parse_warn (cfile, "left parenthesis expected.");
@@ -4197,7 +4197,7 @@ int parse_non_binary (expr, cfile, lose, context)
return 0;
}
break;
-
+
case NUMBER:
/* If we're in a numeric context, this should just be a
number, by itself. */
@@ -4232,7 +4232,7 @@ int parse_non_binary (expr, cfile, lose, context)
(*expr) -> op = expr_const_int;
(*expr) -> data.const_int = known;
break;
-
+
case NS_NOERROR:
known = ISC_R_SUCCESS;
goto ns_const;
@@ -4756,19 +4756,19 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
tmp = (struct expression *)0;
if (!expression_allocate (&tmp, MDL))
log_fatal ("No memory for equal precedence combination.");
-
+
/* Store the LHS and RHS. */
tmp -> data.equal [0] = lhs;
tmp -> data.equal [1] = rhs;
tmp -> op = binop;
-
+
lhs = tmp;
tmp = (struct expression *)0;
rhs = (struct expression *)0;
binop = next_op;
goto new_rhs;
-}
+}
int parse_option_data (expr, cfile, lookups, option)
@@ -4800,7 +4800,7 @@ struct option *option;
fmt = option->format;
/* 'a' means always uniform */
- if ((fmt[0] != 'Z') && (tolower((unsigned char)fmt[1]) == 'a'))
+ if ((fmt[0] != 'Z') && (tolower((unsigned char)fmt[1]) == 'a'))
uniform = 1;
do {
@@ -4894,7 +4894,7 @@ int parse_option_statement (result, cfile, lookups, option, op)
if ((token == SEMI) && (option->format[0] != 'Z')) {
/* Eat the semicolon... */
/*
- * XXXSK: I'm not sure why we should ever get here, but we
+ * XXXSK: I'm not sure why we should ever get here, but we
* do during our startup. This confuses things if
* we are parsing a zero-length option, so don't
* eat the semicolon token in that case.
@@ -5059,7 +5059,7 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
}
break;
- case 'k': /* key name */
+ case 'k': /* key name */
token = peek_token (&val, &len, cfile);
if (token == STRING) {
token = next_token (&val, &len, cfile);
@@ -5132,7 +5132,7 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
return 0;
}
break;
-
+
case 'T': /* Lease interval. */
token = next_token (&val, (unsigned *)0, cfile);
if (token != INFINITE)
@@ -5217,11 +5217,11 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
}
buf[0] = '\0';
if (!make_const_data(&t, /* expression */
- buf, /* buffer */
- 0, /* length */
- 0, /* terminated */
- 1, /* allocate */
- MDL))
+ buf, /* buffer */
+ 0, /* length */
+ 0, /* terminated */
+ 1, /* allocate */
+ MDL))
return 0;
break;
@@ -5305,7 +5305,7 @@ int parse_option_decl (oc, cfile)
sizeof hunkbuf - hunkix);
hunkix += len;
break;
-
+
case 't': /* Text string... */
token = peek_token (&val,
&len, cfile);
@@ -5512,7 +5512,7 @@ int parse_option_decl (oc, cfile)
if (!buffer_allocate (&bp, hunkix + nul_term, MDL))
log_fatal ("no memory to store option declaration.");
memcpy (bp -> data, hunkbuf, hunkix + nul_term);
-
+
if (!option_cache_allocate (oc, MDL))
log_fatal ("out of memory allocating option cache.");
diff --git a/common/resolv.c b/common/resolv.c
index 7174fc8e..f59cae88 100644
--- a/common/resolv.c
+++ b/common/resolv.c
@@ -179,7 +179,7 @@ struct name_server *first_name_server ()
}
if (st.st_mtime > rcdate) {
rcdate = cur_time + 1;
-
+
read_resolv_conf (rcdate);
}
}
diff --git a/common/socket.c b/common/socket.c
index 5772c13e..c3e5f034 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -30,7 +30,7 @@
* This sockopt allows a socket to be bound to a particular interface,
* thus enabling the use of DHCPD on a multihomed host.
* If SO_BINDTODEVICE is defined in your system header files, the use of
- * this sockopt will be automatically enabled.
+ * this sockopt will be automatically enabled.
* I have implemented it under Linux; other systems should be doable also.
*/
@@ -150,15 +150,15 @@ if_register_socket(struct interface_info *info, int family,
once = 1;
#endif
- /*
+ /*
* Set up the address we're going to bind to, depending on the
- * address family.
- */
+ * address family.
+ */
memset(&name, 0, sizeof(name));
switch (family) {
#ifdef DHCPv6
case AF_INET6:
- addr6 = (struct sockaddr_in6 *)&name;
+ addr6 = (struct sockaddr_in6 *)&name;
addr6->sin6_family = AF_INET6;
addr6->sin6_port = local_port;
#if defined(RELAY_PORT)
@@ -194,7 +194,7 @@ if_register_socket(struct interface_info *info, int family,
case AF_INET:
default:
- addr = (struct sockaddr_in *)&name;
+ addr = (struct sockaddr_in *)&name;
addr->sin_family = AF_INET;
addr->sin_port = relay_port ? relay_port : local_port;
memcpy(&addr->sin_addr,
@@ -296,7 +296,7 @@ if_register_socket(struct interface_info *info, int family,
*/
if (family == AF_INET) {
int on = 1;
- if (setsockopt(sock, IPPROTO_IP, IP_RECVPKTINFO,
+ if (setsockopt(sock, IPPROTO_IP, IP_RECVPKTINFO,
&on, sizeof(on)) != 0) {
log_fatal("Can't set IP_RECVPTKINFO on dhcp socket for"
" %s: %m", info->name);
@@ -306,7 +306,7 @@ if_register_socket(struct interface_info *info, int family,
#ifdef DHCPv6
/*
- * If we turn on IPV6_PKTINFO, we will be able to receive
+ * If we turn on IPV6_PKTINFO, we will be able to receive
* additional information, such as the destination IP address.
* We need this to spot unicast packets.
*/
@@ -314,14 +314,14 @@ if_register_socket(struct interface_info *info, int family,
int on = 1;
#ifdef IPV6_RECVPKTINFO
/* RFC3542 */
- if (setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO,
+ if (setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO,
&on, sizeof(on)) != 0) {
log_fatal("setsockopt: IPV6_RECVPKTINFO for %s: %m",
info->name);
}
#else
/* RFC2292 */
- if (setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO,
+ if (setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO,
&on, sizeof(on)) != 0) {
log_fatal("setsockopt: IPV6_PKTINFO for %s: %m",
info->name);
@@ -411,7 +411,7 @@ void if_register_receive (info)
MDL);
}
}
-
+
info->rfdesc = global_v4_socket;
global_v4_socket_references++;
#else
@@ -462,7 +462,7 @@ void if_deregister_receive (info)
#endif /* USE_SOCKET_RECEIVE */
-#ifdef DHCPv6
+#ifdef DHCPv6
/*
* This function joins the interface to DHCPv6 multicast groups so we will
* receive multicast messages.
@@ -474,11 +474,11 @@ if_register_multicast(struct interface_info *info) {
if (inet_pton(AF_INET6, All_DHCP_Relay_Agents_and_Servers,
&mreq.ipv6mr_multiaddr) <= 0) {
- log_fatal("inet_pton: unable to convert '%s'",
+ log_fatal("inet_pton: unable to convert '%s'",
All_DHCP_Relay_Agents_and_Servers);
}
mreq.ipv6mr_interface = if_nametoindex(info->name);
- if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
+ if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
&mreq, sizeof(mreq)) < 0) {
log_fatal("setsockopt: IPV6_JOIN_GROUP for %s: %m",
info->name);
@@ -494,11 +494,11 @@ if_register_multicast(struct interface_info *info) {
if ((info->flags & INTERFACE_STREAMS) == 0) {
if (inet_pton(AF_INET6, All_DHCP_Servers,
&mreq.ipv6mr_multiaddr) <= 0) {
- log_fatal("inet_pton: unable to convert '%s'",
+ log_fatal("inet_pton: unable to convert '%s'",
All_DHCP_Servers);
}
mreq.ipv6mr_interface = if_nametoindex(info->name);
- if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
+ if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
&mreq, sizeof(mreq)) < 0) {
log_fatal("setsockopt: IPV6_JOIN_GROUP for %s: %m",
info->name);
@@ -545,7 +545,7 @@ if_register6(struct interface_info *info, int do_multicast) {
log_info("Bound to *:%d", (int) ntohs(local_port));
}
}
-
+
info->rfdesc = global_v6_socket;
info->wfdesc = global_v6_socket;
global_v6_socket_references++;
@@ -582,7 +582,7 @@ if_register6(struct interface_info *info, int do_multicast) {
if (!quiet_interface_discovery) {
if (info->shared_network != NULL) {
log_info("Listening on Socket/%d/%s/%s",
- global_v6_socket, info->name,
+ global_v6_socket, info->name,
info->shared_network->name);
log_info("Sending on Socket/%d/%s/%s",
global_v6_socket, info->name,
@@ -610,7 +610,7 @@ if_register_linklocal6(struct interface_info *info) {
if (global_v6_socket >= 0) {
log_fatal("Impossible condition at %s:%d", MDL);
}
-
+
no_global_v6_socket = 1;
/* get the (?) link-local address */
@@ -638,7 +638,7 @@ if_register_linklocal6(struct interface_info *info) {
if (!quiet_interface_discovery) {
if (info->shared_network != NULL) {
log_info("Listening on Socket/%d/%s/%s",
- global_v6_socket, info->name,
+ global_v6_socket, info->name,
info->shared_network->name);
log_info("Sending on Socket/%d/%s/%s",
global_v6_socket, info->name,
@@ -650,7 +650,7 @@ if_register_linklocal6(struct interface_info *info) {
}
}
-void
+void
if_deregister6(struct interface_info *info) {
/* client case */
if (no_global_v6_socket) {
@@ -734,7 +734,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
pktinfo.ipi_ifindex = interface->ifp->ifr_index;
if (setsockopt(interface->wfdesc, IPPROTO_IP,
IP_PKTINFO, (char *)&pktinfo,
- sizeof(pktinfo)) < 0)
+ sizeof(pktinfo)) < 0)
log_fatal("setsockopt: IP_PKTINFO for %s: %m",
(char*)(interface->ifp));
}
@@ -761,7 +761,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
#ifdef DHCPv6
/*
- * Solaris 9 is missing the CMSG_LEN and CMSG_SPACE macros, so we will
+ * Solaris 9 is missing the CMSG_LEN and CMSG_SPACE macros, so we will
* synthesize them (based on the BIND 9 technique).
*/
@@ -831,16 +831,16 @@ allocate_cmsg_cbuf(void) {
#endif /* DHCPv6, IP_PKTINFO ... */
#ifdef DHCPv6
-/*
- * For both send_packet6() and receive_packet6() we need to use the
+/*
+ * For both send_packet6() and receive_packet6() we need to use the
* sendmsg()/recvmsg() functions rather than the simpler send()/recv()
* functions.
*
* In the case of send_packet6(), we need to do this in order to insure
- * that the reply packet leaves on the same interface that it arrived
- * on.
+ * that the reply packet leaves on the same interface that it arrived
+ * on.
*
- * In the case of receive_packet6(), we need to do this in order to
+ * In the case of receive_packet6(), we need to do this in order to
* get the IP address the packet was sent to. This is used to identify
* whether a packet is multicast or unicast.
*
@@ -898,8 +898,8 @@ ssize_t send_packet6(struct interface_info *interface,
dst.sin6_scope_id = ifindex;
/*
- * Set the data buffer we're sending. (Using this wacky
- * "scatter-gather" stuff... we only have a single chunk
+ * Set the data buffer we're sending. (Using this wacky
+ * "scatter-gather" stuff... we only have a single chunk
* of data to send, so we declare a single vector entry.)
*/
v.iov_base = (char *)raw;
@@ -909,11 +909,11 @@ ssize_t send_packet6(struct interface_info *interface,
/*
* Setting the interface is a bit more involved.
- *
- * We have to create a "control message", and set that to
+ *
+ * We have to create a "control message", and set that to
* define the IPv6 packet information. We could set the
* source address if we wanted, but we can safely let the
- * kernel decide what that should be.
+ * kernel decide what that should be.
*/
m.msg_control = control_buf;
m.msg_controllen = control_buf_len;
@@ -993,7 +993,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
m.msg_namelen = sizeof(*from);
/*
- * Set the data buffer we're receiving. (Using this wacky
+ * Set the data buffer we're receiving. (Using this wacky
* "scatter-gather" stuff... but we that doesn't really make
* sense for us, so we use a single vector entry.)
*/
@@ -1005,8 +1005,8 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/*
* Getting the interface is a bit more involved.
*
- * We set up some space for a "control message". We have
- * previously asked the kernel to give us packet
+ * We set up some space for a "control message". We have
+ * previously asked the kernel to give us packet
* information (when we initialized the interface), so we
* should get the interface index from that.
*/
@@ -1018,19 +1018,19 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
if (result >= 0) {
/*
* If we did read successfully, then we need to loop
- * through the control messages we received and
+ * through the control messages we received and
* find the one with our inteface index.
*/
cmsg = CMSG_FIRSTHDR(&m);
while (cmsg != NULL) {
- if ((cmsg->cmsg_level == IPPROTO_IP) &&
+ if ((cmsg->cmsg_level == IPPROTO_IP) &&
(cmsg->cmsg_type == IP_PKTINFO)) {
pktinfo = (struct in_pktinfo *)CMSG_DATA(cmsg);
ifindex = pktinfo->ipi_ifindex;
/*
- * We pass the ifindex back to the caller
+ * We pass the ifindex back to the caller
* using the unused hfrom parameter avoiding
- * interface changes between sockets and
+ * interface changes between sockets and
* the discover code.
*/
memcpy(hfrom->hbuf, &ifindex, sizeof(ifindex));
@@ -1062,9 +1062,9 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
#endif /* USE_SOCKET_RECEIVE */
#ifdef DHCPv6
-ssize_t
-receive_packet6(struct interface_info *interface,
- unsigned char *buf, size_t len,
+ssize_t
+receive_packet6(struct interface_info *interface,
+ unsigned char *buf, size_t len,
struct sockaddr_in6 *from, struct in6_addr *to_addr,
unsigned int *if_idx)
{
@@ -1100,7 +1100,7 @@ receive_packet6(struct interface_info *interface,
m.msg_namelen = sizeof(*from);
/*
- * Set the data buffer we're receiving. (Using this wacky
+ * Set the data buffer we're receiving. (Using this wacky
* "scatter-gather" stuff... but we that doesn't really make
* sense for us, so we use a single vector entry.)
*/
@@ -1112,8 +1112,8 @@ receive_packet6(struct interface_info *interface,
/*
* Getting the interface is a bit more involved.
*
- * We set up some space for a "control message". We have
- * previously asked the kernel to give us packet
+ * We set up some space for a "control message". We have
+ * previously asked the kernel to give us packet
* information (when we initialized the interface), so we
* should get the destination address from that.
*/
@@ -1125,12 +1125,12 @@ receive_packet6(struct interface_info *interface,
if (result >= 0) {
/*
* If we did read successfully, then we need to loop
- * through the control messages we received and
+ * through the control messages we received and
* find the one with our destination address.
*/
cmsg = CMSG_FIRSTHDR(&m);
while (cmsg != NULL) {
- if ((cmsg->cmsg_level == IPPROTO_IPV6) &&
+ if ((cmsg->cmsg_level == IPPROTO_IPV6) &&
(cmsg->cmsg_type == IPV6_PKTINFO)) {
pktinfo = (struct in6_pktinfo *)CMSG_DATA(cmsg);
*to_addr = pktinfo->ipi6_addr;
@@ -1230,7 +1230,7 @@ void maybe_setup_fallback ()
(fbi -> shared_network ? "/" : ""),
(fbi -> shared_network ?
fbi -> shared_network -> name : ""));
-
+
status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
diff --git a/common/tables.c b/common/tables.c
index 28f34111..5421170c 100644
--- a/common/tables.c
+++ b/common/tables.c
@@ -86,7 +86,7 @@ HASH_FUNCTIONS (option_code, const unsigned *, struct option,
named enumeration. Named enumerations are tracked in parse.c.
d - Domain name (e.g., FOO or FOO.BAR) no quotes,
on-wire format is RFC 1035.
- D - Domain list (e.g., "example.com eng.example.com") quoted,
+ D - Domain list (e.g., "example.com eng.example.com") quoted,
on-wire format is RFC 1035.
c - When following a 'D' atom, enables compression pointers.
Z - Zero-length option
diff --git a/common/tr.c b/common/tr.c
index 34183654..70c9b10e 100644
--- a/common/tr.c
+++ b/common/tr.c
@@ -152,7 +152,7 @@ ssize_t decode_tr_header (interface, buf, bufix, from)
&& llc->protid[1] == 0
&& llc->protid[2] == 0) {
/* say there is source routing information present */
- trh->saddr[0] |= TR_RII;
+ trh->saddr[0] |= TR_RII;
}
if (trh->saddr[0] & TR_RII)
@@ -199,7 +199,7 @@ static int insert_source_routing (trh, interface)
/* single route broadcasts as per rfc 1042 */
if (memcmp(trh->daddr, tr_broadcast,TR_ALEN) == 0) {
trh->saddr[0] |= TR_RII;
- trh->rcf = ((sizeof(trh->rcf)) << 8) & TR_RCF_LEN_MASK;
+ trh->rcf = ((sizeof(trh->rcf)) << 8) & TR_RCF_LEN_MASK;
trh->rcf |= (TR_RCF_FRAME2K | TR_RCF_LIMITED_BROADCAST);
trh->rcf = htons(trh->rcf);
} else {
@@ -214,7 +214,7 @@ static int insert_source_routing (trh, interface)
if ((rover->rcf & TR_RCF_LEN_MASK) >> 8) {
u_int16_t rcf = rover->rcf;
memcpy(trh->rseg,rover->rseg,sizeof(trh->rseg));
- rcf ^= TR_RCF_DIR_BIT;
+ rcf ^= TR_RCF_DIR_BIT;
rcf &= ~TR_RCF_BROADCAST_MASK;
trh->rcf = htons(rcf);
trh->saddr[0] |= TR_RII;
@@ -224,7 +224,7 @@ static int insert_source_routing (trh, interface)
/* we don't have any routing information so send a
* limited broadcast */
trh->saddr[0] |= TR_RII;
- trh->rcf = ((sizeof(trh->rcf)) << 8) & TR_RCF_LEN_MASK;
+ trh->rcf = ((sizeof(trh->rcf)) << 8) & TR_RCF_LEN_MASK;
trh->rcf |= (TR_RCF_FRAME2K | TR_RCF_LIMITED_BROADCAST);
trh->rcf = htons(trh->rcf);
}
diff --git a/common/tree.c b/common/tree.c
index b9d5d76d..e17df578 100644
--- a/common/tree.c
+++ b/common/tree.c
@@ -42,14 +42,14 @@ static int do_host_lookup (struct data_string *, struct dns_host_entry *);
#define DS_SPRINTF_SIZE 128
/*
- * If we are using a data_string structure to hold a NUL-terminated
- * ASCII string, this function can be used to append a printf-formatted
+ * If we are using a data_string structure to hold a NUL-terminated
+ * ASCII string, this function can be used to append a printf-formatted
* string to the end of it. The data_string structure will be resized to
* be big enough to hold the new string.
*
* If the append works, then 1 is returned.
*
- * If it is not possible to allocate a buffer big enough to hold the
+ * If it is not possible to allocate a buffer big enough to hold the
* new value, then the old data_string is unchanged, and 0 is returned.
*/
int
@@ -81,7 +81,7 @@ data_string_sprintfa(struct data_string *ds, const char *fmt, ...) {
cur_strlen = strlen((char *)ds->data);
max = ds->len - cur_strlen;
- /*
+ /*
* Use vsnprintf(), which won't write past our space, but will
* tell us how much space it wants.
*/
@@ -94,7 +94,7 @@ data_string_sprintfa(struct data_string *ds, const char *fmt, ...) {
* If our buffer is not big enough, we need a new buffer.
*/
if (vsnprintf_ret >= max) {
- /*
+ /*
* Figure out a size big enough.
*/
new_len = ds->len * 2;
@@ -102,13 +102,13 @@ data_string_sprintfa(struct data_string *ds, const char *fmt, ...) {
new_len *= 2;
}
- /*
+ /*
* Create a new buffer and fill it.
*/
tmp_buffer = NULL;
if (!buffer_allocate(&tmp_buffer, new_len, MDL)) {
- /*
- * If we can't create a big enough buffer,
+ /*
+ * If we can't create a big enough buffer,
* we should remove any truncated output that we had.
*/
*((char *)ds->data+cur_strlen) = '\0';
@@ -240,7 +240,7 @@ int make_const_data (struct expression **expr, const unsigned char *data,
&nt -> data.const_data.buffer -> data [0];
memcpy (nt -> data.const_data.buffer -> data,
data, len + terminated);
- } else
+ } else
nt -> data.const_data.data = data;
nt -> data.const_data.terminated = terminated;
} else
@@ -282,13 +282,13 @@ int make_concat (expr, left, right)
expression_reference (expr, left, MDL);
return 1;
}
-
+
/* Otherwise, allocate a new node to concatenate the two. */
if (!expression_allocate (expr, MDL)) {
log_error ("No memory for concatenation expression node.");
return 0;
}
-
+
(*expr) -> op = expr_concat;
expression_reference (&(*expr) -> data.concat [0], left, MDL);
expression_reference (&(*expr) -> data.concat [1], right, MDL);
@@ -304,7 +304,7 @@ int make_encapsulation (expr, name)
log_error ("No memory for encapsulation expression node.");
return 0;
}
-
+
(*expr) -> op = expr_encapsulate;
data_string_copy (&(*expr) -> data.encapsulate, name, MDL);
return 1;
@@ -380,7 +380,7 @@ int make_let (result, name)
{
if (!(executable_statement_allocate (result, MDL)))
return 0;
-
+
(*result) -> op = let_statement;
(*result) -> data.let.name = dmalloc (strlen (name) + 1, MDL);
if (!(*result) -> data.let.name) {
@@ -390,7 +390,7 @@ int make_let (result, name)
strcpy ((*result) -> data.let.name, name);
return 1;
}
-
+
static int do_host_lookup (result, dns)
struct data_string *result;
struct dns_host_entry *dns;
@@ -457,7 +457,7 @@ static int do_host_lookup (result, dns)
/* Count the number of addresses we got... */
for (count = 0; h -> h_addr_list [count]; count++)
;
-
+
/* Dereference the old data, if any. */
data_string_forget (&dns -> data, MDL);
@@ -1571,8 +1571,8 @@ int evaluate_data_expression (result, packet, lease, client_state,
result -> data, 20));
#endif
return s0;
-
-
+
+
case expr_encode_int16:
s0 = evaluate_numeric_expression (&len, packet, lease,
client_state,
@@ -1994,7 +1994,7 @@ int evaluate_data_expression (result, packet, lease, client_state,
memchr (packet -> raw -> sname, 0,
sizeof packet -> raw -> sname);
if (!fn)
- fn = ((char *)packet -> raw -> sname +
+ fn = ((char *)packet -> raw -> sname +
sizeof packet -> raw -> sname);
result -> len = fn - &packet -> raw -> sname [0];
if (buffer_allocate (&result -> buffer,
@@ -2080,7 +2080,7 @@ int evaluate_data_expression (result, packet, lease, client_state,
/* no number or an obviously invalid number */
if ((s0 == 0) ||
- ((len > 0) &&
+ ((len > 0) &&
((packet == NULL) ||
(packet->dhcpv6_container_packet == NULL)))) {
#if defined (DEBUG_EXPRESSIONS)
@@ -2093,7 +2093,7 @@ int evaluate_data_expression (result, packet, lease, client_state,
i = len;
relay_packet = packet;
relay_options = in_options;
- while ((i != 0) &&
+ while ((i != 0) &&
(relay_packet->dhcpv6_container_packet != NULL)) {
relay_packet = relay_packet->dhcpv6_container_packet;
relay_options = relay_packet->options;
@@ -2224,7 +2224,7 @@ int evaluate_data_expression (result, packet, lease, client_state,
log_error ("Bogus opcode in evaluate_data_expression: %d", expr -> op);
return 0;
-}
+}
int evaluate_numeric_expression (result, packet, lease, client_state,
in_options, cfg_options, scope, expr)
@@ -2377,7 +2377,7 @@ int evaluate_numeric_expression (result, packet, lease, client_state,
(long unsigned)cur_time, *result);
#endif
return (1);
-
+
case expr_variable_reference:
if (scope && *scope) {
binding = find_binding (*scope, expr -> data.variable);
@@ -2793,7 +2793,7 @@ int evaluate_boolean_expression_result (ignorep, packet, lease, client_state,
/* So that we can be called with option_lookup as an argument. */
if (!expr)
return 0;
-
+
if (!evaluate_boolean_expression (&result, packet, lease, client_state,
in_options, cfg_options,
scope, expr))
@@ -2806,7 +2806,7 @@ int evaluate_boolean_expression_result (ignorep, packet, lease, client_state,
*ignorep = 0;
return result;
}
-
+
/* Dereference an expression node, and if the reference count goes to zero,
dereference any data it refers to, and then free it. */
@@ -3318,7 +3318,7 @@ int write_expression (file, expr, col, indent, firstp)
case expr_none:
col = token_print_indent (file, col, indent, "", "", "null");
break;
-
+
case expr_check:
col = token_print_indent (file, col, indent, "", "", "check");
col = token_print_indent_concat (file, col, indent,
@@ -3483,7 +3483,7 @@ int write_expression (file, expr, col, indent, firstp)
if (expr -> data.option -> universe != &dhcp_universe) {
col = token_print_indent (file, col, indent,
" ", "",
- (expr -> data.option ->
+ (expr -> data.option ->
universe -> name));
col = token_print_indent (file, col, indent, "", "",
".");
@@ -3495,7 +3495,7 @@ int write_expression (file, expr, col, indent, firstp)
}
break;
- case expr_hardware:
+ case expr_hardware:
col = token_print_indent (file, col, indent, "", "",
"hardware");
break;
@@ -3941,7 +3941,7 @@ int data_subexpression_length (int *rv,
else
*rv = lrhs;
return 1;
-
+
case expr_v6relay:
clhs = data_subexpression_length (&llhs,
expr -> data.v6relay.relay);
@@ -4148,11 +4148,11 @@ int unset (struct binding_scope *scope, const char *name)
/*!
* \brief Adds two Dc-formatted lists into a single Dc-formatted list
*
- * Given two data_strings containing compressed lists, it constructs a
+ * Given two data_strings containing compressed lists, it constructs a
* third data_string containing a single compressed list:
*
* 1. Decompressing the first list into a buffer
- * 2. Decompressing the second list onto the end of the buffer
+ * 2. Decompressing the second list onto the end of the buffer
* 3. Compressing the buffer into the result
*
* If either list is empty, the result will be the equal to the compressed
@@ -4161,17 +4161,17 @@ int unset (struct binding_scope *scope, const char *name)
*
* It relies on two functions to decompress and compress:
*
- * - MRns_name_uncompress_list() - produces a null-terminated string of
+ * - MRns_name_uncompress_list() - produces a null-terminated string of
* comma-separated domain-names from a buffer containing "Dc" formatted
* data
*
* - MRns_name_compress_list() - produces a buffer containing "Dc" formatted
* data from a null-terminated string containing comma-separated domain-names
- *
+ *
* \param result data_string which will contain the combined list
* in Dc format
- * \param list1 data_string containing first Dc formatted list
- * \param list2 data_string containing second Dc formatted list
+ * \param list1 data_string containing first Dc formatted list
+ * \param list2 data_string containing second Dc formatted list
* \return 0 if there is an error, the length of the new list when successful
*/
int concat_dclists (struct data_string* result,
diff --git a/common/upf.c b/common/upf.c
index b1a38e15..85a1187e 100644
--- a/common/upf.c
+++ b/common/upf.c
@@ -94,7 +94,7 @@ int if_register_upf (info)
info -> name);
/* We only know how to do ethernet. */
- if (param.end_dev_type != ENDT_10MB)
+ if (param.end_dev_type != ENDT_10MB)
log_fatal ("Invalid device type on network interface %s: %d",
info -> name, param.end_dev_type);