summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-02-07 13:59:46 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-02-07 13:59:46 +0000
commit84d547d19d962f4819bf10494b73043c9369e76a (patch)
tree2f2eea1d5c59632142de8c7ae3a902549de33fcd /sbin
parentd8d132cda4d8e58257f5772c72126719cd14aa8b (diff)
KNF
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.c149
-rw-r--r--sbin/dhclient/dhcp.h4
-rw-r--r--sbin/dhclient/hash.c4
-rw-r--r--sbin/dhclient/icmp.c10
-rw-r--r--sbin/dhclient/options.c8
-rw-r--r--sbin/dhclient/osdep.h21
-rw-r--r--sbin/dhclient/parse.c18
-rw-r--r--sbin/dhclient/print.c4
-rw-r--r--sbin/dhclient/socket.c4
-rw-r--r--sbin/dhclient/tree.c8
10 files changed, 114 insertions, 116 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 77e6fb30d8a..bc1b9a34a85 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.6 2004/02/07 13:26:35 henning Exp $ */
+/* $OpenBSD: dhclient.c,v 1.7 2004/02/07 13:59:45 henning Exp $ */
/* DHCP Client. */
@@ -56,20 +56,20 @@
#include "dhcpd.h"
-#define PERIOD 0x2e
-#define hyphenchar(c) ((c) == 0x2d)
-#define bslashchar(c) ((c) == 0x5c)
-#define periodchar(c) ((c) == PERIOD)
-#define asterchar(c) ((c) == 0x2a)
-#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \
- || ((c) >= 0x61 && (c) <= 0x7a))
-#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
+#define PERIOD 0x2e
+#define hyphenchar(c) ((c) == 0x2d)
+#define bslashchar(c) ((c) == 0x5c)
+#define periodchar(c) ((c) == PERIOD)
+#define asterchar(c) ((c) == 0x2a)
+#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) || \
+ ((c) >= 0x61 && (c) <= 0x7a))
+#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
-#define borderchar(c) (alphachar(c) || digitchar(c))
-#define middlechar(c) (borderchar(c) || hyphenchar(c))
-#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
+#define borderchar(c) (alphachar(c) || digitchar(c))
+#define middlechar(c) (borderchar(c) || hyphenchar(c))
+#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
-#define CLIENT_PATH "PATH=/usr/bin:/usr/sbin:/bin:/sbin"
+#define CLIENT_PATH "PATH=/usr/bin:/usr/sbin:/bin:/sbin"
TIME cur_time;
TIME default_lease_time = 43200; /* 12 hours... */
@@ -127,16 +127,16 @@ isours(u_int16_t index)
{
struct interface_info *ip;
- for(ip = interfaces; ip; ip = ip->next) {
+ for (ip = interfaces; ip; ip = ip->next)
if (index == ip->index)
return (ip);
- }
+
return (NULL);
}
-#define ROUNDUP(a) \
- ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
+#define ROUNDUP(a) \
+ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
int
findproto(char *cp, int n)
@@ -271,21 +271,21 @@ main(int argc, char *argv[])
unknown_ok = 0;
} else if (!strcmp(argv[i], "-1")) {
onetry = 1;
- } else if (argv[i][0] == '-') {
- usage(s);
- } else {
- struct interface_info *tmp =
- dmalloc(sizeof(*tmp), "specified_interface");
- if (!tmp)
- error("Insufficient memory to %s %s",
- "record interface", argv[i]);
- memset(tmp, 0, sizeof(*tmp));
- strlcpy(tmp->name, argv[i], IFNAMSIZ);
- tmp->next = interfaces;
- tmp->flags = INTERFACE_REQUESTED;
+ } else if (argv[i][0] == '-') {
+ usage(s);
+ } else {
+ struct interface_info *tmp =
+ dmalloc(sizeof(*tmp), "specified_interface");
+ if (!tmp)
+ error("Insufficient memory to %s %s",
+ "record interface", argv[i]);
+ memset(tmp, 0, sizeof(*tmp));
+ strlcpy(tmp->name, argv[i], IFNAMSIZ);
+ tmp->next = interfaces;
+ tmp->flags = INTERFACE_REQUESTED;
interfaces_requested = 1;
- interfaces = tmp;
- }
+ interfaces = tmp;
+ }
}
if (quiet)
@@ -375,7 +375,7 @@ main(int argc, char *argv[])
Not much entropy, but we're booting, so we're not likely to
find anything better. */
seed = 0; /* Unfortunately, what's on the stack isn't random. :') */
- for(ip = interfaces; ip; ip = ip->next) {
+ for (ip = interfaces; ip; ip = ip->next) {
int junk;
memcpy(&junk, &ip->hw_address.haddr[ip->hw_address.hlen -
sizeof(seed)], sizeof(seed));
@@ -384,7 +384,7 @@ main(int argc, char *argv[])
srandom(seed + cur_time);
/* Start a configuration state machine for each interface. */
- for(ip = interfaces; ip; ip = ip->next) {
+ for (ip = interfaces; ip; ip = ip->next) {
ip->client->state = S_INIT;
state_reboot(ip);
}
@@ -1169,9 +1169,8 @@ again:
ip->client->secs = ip->client->packet.secs;
note("DHCPDISCOVER on %s to %s port %d interval %d",
- ip->name,
- inet_ntoa(sockaddr_broadcast.sin_addr),
- ntohs(sockaddr_broadcast.sin_port), ip->client->interval);
+ ip->name, inet_ntoa(sockaddr_broadcast.sin_addr),
+ ntohs(sockaddr_broadcast.sin_port), ip->client->interval);
/* Send out a packet. */
result = send_packet(ip, NULL, &ip->client->packet,
@@ -1691,12 +1690,12 @@ make_decline(struct interface_info *ip, struct client_lease *lease)
/* Send back the server identifier... */
i = DHO_DHCP_SERVER_IDENTIFIER;
- options[i] = &server_id_tree;
- options[i]->value = lease->options[i].data;
- options[i]->len = lease->options[i].len;
- options[i]->buf_size = lease->options[i].len;
- options[i]->timeout = 0xFFFFFFFF;
- options[i]->tree = NULL;
+ options[i] = &server_id_tree;
+ options[i]->value = lease->options[i].data;
+ options[i]->len = lease->options[i].len;
+ options[i]->buf_size = lease->options[i].len;
+ options[i]->timeout = 0xFFFFFFFF;
+ options[i]->tree = NULL;
/* Send back the address we're declining. */
i = DHO_DHCP_REQUESTED_ADDRESS;
@@ -1775,12 +1774,12 @@ make_release(struct interface_info *ip, struct client_lease *lease)
/* Send back the server identifier... */
i = DHO_DHCP_SERVER_IDENTIFIER;
- options[i] = &server_id_tree;
- options[i]->value = lease->options[i].data;
- options[i]->len = lease->options[i].len;
- options[i]->buf_size = lease->options[i].len;
- options[i]->timeout = 0xFFFFFFFF;
- options[i]->tree = NULL;
+ options[i] = &server_id_tree;
+ options[i]->value = lease->options[i].data;
+ options[i]->len = lease->options[i].len;
+ options[i]->buf_size = lease->options[i].len;
+ options[i]->timeout = 0xFFFFFFFF;
+ options[i]->tree = NULL;
/* Set up the option buffer... */
ip->client->packet_length = cons_options(NULL, &ip->client->packet, 0,
@@ -1810,7 +1809,7 @@ make_release(struct interface_info *ip, struct client_lease *lease)
#ifdef DEBUG_PACKET
dump_packet(sendpkt);
dump_raw((unsigned char *)ip->client->packet,
- ip->client->packet_length);
+ ip->client->packet_length);
#endif
}
@@ -1943,11 +1942,11 @@ script_init(struct interface_info *ip, char *reason, struct string_list *medium)
ip->client->scriptEnv =
malloc(ip->client->scriptEnvsize * sizeof(char *));
if (ip->client->scriptEnv == NULL)
- error("script_init: no memory for environment initialization");
+ error("script_init: no memory for environment");
ip->client->scriptEnv[0]=strdup(CLIENT_PATH);
if (ip->client->scriptEnv[0] == NULL)
- error("script_init: no memory for environment initialization");
+ error("script_init: no memory for environment");
ip->client->scriptEnv[1] = NULL;
@@ -2014,14 +2013,14 @@ script_write_params(struct interface_info *ip, char *prefix,
if (ip->client->config->defaults[i].len) {
if (lease->options[i].len) {
- switch(
+ switch (
ip->client->config->default_actions[i]) {
case ACTION_DEFAULT:
dp = lease->options[i].data;
len = lease->options[i].len;
break;
case ACTION_SUPERSEDE:
- supersede:
+supersede:
dp = ip->client->
config->defaults[i].data;
len = ip->client->
@@ -2029,12 +2028,12 @@ script_write_params(struct interface_info *ip, char *prefix,
break;
case ACTION_PREPEND:
len = ip->client->
- config->defaults[i].len +
- lease->options[i].len;
+ config->defaults[i].len +
+ lease->options[i].len;
if (len > sizeof(dbuf)) {
warn("no space to %s %s",
- "prepend option",
- dhcp_options[i].name);
+ "prepend option",
+ dhcp_options[i].name);
goto supersede;
}
dp = dbuf;
@@ -2051,12 +2050,12 @@ script_write_params(struct interface_info *ip, char *prefix,
break;
case ACTION_APPEND:
len = ip->client->
- config->defaults[i].len +
- lease->options[i].len;
+ config->defaults[i].len +
+ lease->options[i].len;
if (len > sizeof(dbuf)) {
warn("no space to %s %s",
- "append option",
- dhcp_options[i].name);
+ "append option",
+ dhcp_options[i].name);
goto supersede;
}
dp = dbuf;
@@ -2165,7 +2164,7 @@ script_set_env(struct client_state *client, const char *prefix,
char **newscriptEnv;
int newscriptEnvsize = client->scriptEnvsize + 50;
newscriptEnv = realloc(client->scriptEnv,
- newscriptEnvsize);
+ newscriptEnvsize);
if (newscriptEnv == NULL) {
free(client->scriptEnv);
client->scriptEnv = NULL;
@@ -2180,13 +2179,13 @@ script_set_env(struct client_state *client, const char *prefix,
client->scriptEnv[i + 1] = NULL;
}
/* Allocate space and format the variable in the appropriate slot. */
- client->scriptEnv[i] = malloc(strlen(prefix) + strlen(name) + 1
- + strlen(value) + 1);
+ client->scriptEnv[i] = malloc(strlen(prefix) + strlen(name) + 1 +
+ strlen(value) + 1);
if (client->scriptEnv[i] == NULL)
error("script_set_env: no memory for variable assignment");
- snprintf(client->scriptEnv[i], strlen(prefix) + strlen(name)
- + 1 + strlen(value) + 1, "%s%s=%s", prefix, name, value);
+ snprintf(client->scriptEnv[i], strlen(prefix) + strlen(name) +
+ 1 + strlen(value) + 1, "%s%s=%s", prefix, name, value);
}
void
@@ -2248,9 +2247,9 @@ go_daemon(void)
pid = setsid();
/* Close standard I/O descriptors. */
- close(0);
- close(1);
- close(2);
+ close(0);
+ close(1);
+ close(2);
write_client_pid_file();
}
@@ -2291,7 +2290,7 @@ check_option(struct client_lease *l, int option)
sbuf = option_as_string(option, l->options[option].data,
l->options[option].len);
- switch(option) {
+ switch (option) {
case DHO_SUBNET_MASK :
case DHO_TIME_SERVERS :
case DHO_NAME_SERVERS :
@@ -2373,10 +2372,10 @@ check_option(struct client_lease *l, int option)
case DHO_DHCP_USER_CLASS_ID :
case DHO_END :
/* do nothing */
- return(1);
+ return (1);
default:
warn("unknown dhcp option value 0x%x", option);
- return(unknown_ok);
+ return (unknown_ok);
}
}
@@ -2420,11 +2419,11 @@ ipv4addrs(char * buf)
while (periodchar(*buf) || digitchar(*buf))
buf++;
if (*buf == '\0')
- return(count);
+ return (count);
while (*buf == ' ')
buf++;
}
- return(0);
+ return (0);
}
diff --git a/sbin/dhclient/dhcp.h b/sbin/dhclient/dhcp.h
index d90905b697a..2d91d437a3f 100644
--- a/sbin/dhclient/dhcp.h
+++ b/sbin/dhclient/dhcp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcp.h,v 1.3 2004/02/07 13:26:35 henning Exp $ */
+/* $OpenBSD: dhcp.h,v 1.4 2004/02/07 13:59:45 henning Exp $ */
/* Protocol structures... */
@@ -55,7 +55,7 @@
#define DHCP_MIN_LEN 548
struct dhcp_packet {
- u_int8_t op; /* Message opcode/type */
+ u_int8_t op; /* Message opcode/type */
u_int8_t htype; /* Hardware addr type (see net/if_types.h) */
u_int8_t hlen; /* Hardware addr length */
u_int8_t hops; /* Number of relay agent hops from client */
diff --git a/sbin/dhclient/hash.c b/sbin/dhclient/hash.c
index abf3673ccd1..1bfc48e9b1f 100644
--- a/sbin/dhclient/hash.c
+++ b/sbin/dhclient/hash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hash.c,v 1.4 2004/02/07 13:26:35 henning Exp $ */
+/* $OpenBSD: hash.c,v 1.5 2004/02/07 13:59:45 henning Exp $ */
/* Routines for manipulating hash tables... */
@@ -130,7 +130,7 @@ delete_hash_entry(struct hash_table *table, unsigned char *name, int len)
}
unsigned char *
-hash_lookup (struct hash_table *table, unsigned char *name, int len)
+hash_lookup(struct hash_table *table, unsigned char *name, int len)
{
int hashno;
struct hash_bucket *bp;
diff --git a/sbin/dhclient/icmp.c b/sbin/dhclient/icmp.c
index fb59c04d09c..888ac0ff3e0 100644
--- a/sbin/dhclient/icmp.c
+++ b/sbin/dhclient/icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp.c,v 1.4 2004/02/07 13:26:35 henning Exp $ */
+/* $OpenBSD: icmp.c,v 1.5 2004/02/07 13:59:45 henning Exp $ */
/*
* ICMP Protocol engine - for sending out pings and receiving responses.
@@ -78,14 +78,14 @@ icmp_startup(int routep, void (*handler)(struct iaddr, u_int8_t *, int))
/* Make sure it does routing... */
state = 0;
if (setsockopt(icmp_protocol_fd, SOL_SOCKET, SO_DONTROUTE,
- (char *)&state, sizeof(state)) < 0)
+ (char *)&state, sizeof(state)) < 0)
error("Unable to disable SO_DONTROUTE on ICMP socket: %m");
add_protocol("icmp", icmp_protocol_fd, icmp_echoreply, (void *)handler);
}
int
-icmp_echorequest (struct iaddr *addr)
+icmp_echorequest(struct iaddr *addr)
{
struct sockaddr_in to;
struct icmp icmp;
@@ -105,8 +105,8 @@ icmp_echorequest (struct iaddr *addr)
icmp.icmp_cksum = 0;
icmp.icmp_seq = 0;
#ifdef PTRSIZE_64BIT
- icmp.icmp_id = ((u_int32_t)(u_int64_t)addr) ^
- (u_int32_t)(((u_int64_t)addr) >> 32);
+ icmp.icmp_id =
+ ((u_int32_t)(u_int64_t)addr) ^ (u_int32_t)(((u_int64_t)addr) >> 32);
#else
icmp.icmp_id = (u_int32_t)addr;
#endif
diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c
index 1a713e93029..1d9b264f573 100644
--- a/sbin/dhclient/options.c
+++ b/sbin/dhclient/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.4 2004/02/07 13:26:35 henning Exp $ */
+/* $OpenBSD: options.c,v 1.5 2004/02/07 13:59:45 henning Exp $ */
/* DHCP options parsing and reassembly. */
@@ -152,7 +152,7 @@ parse_option_buffer(struct packet *packet,
if (!packet->options[code].data) {
if (!(t = dmalloc(len + 1, "parse_option_buffer")))
error("Can't allocate storage for option %s.",
- dhcp_options[code].name);
+ dhcp_options[code].name);
/*
* Copy and NUL-terminate the option (in case
* it's an ASCII string.
@@ -218,7 +218,7 @@ cons_options(struct packet *inpacket, struct dhcp_packet *outpacket,
inpacket &&
inpacket->options[DHO_DHCP_MAX_MESSAGE_SIZE].data &&
(inpacket->options[DHO_DHCP_MAX_MESSAGE_SIZE].len >=
- sizeof(u_int16_t)))
+ sizeof(u_int16_t)))
mms = getUShort(
inpacket->options[DHO_DHCP_MAX_MESSAGE_SIZE].data);
@@ -566,7 +566,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
/* Cycle through the array (or hunk) printing the data. */
for (i = 0; i < numhunk; i++) {
for (j = 0; j < numelem; j++) {
- int opcount;
+ int opcount;
switch (fmtbuf[j]) {
case 't':
if (emit_quotes) {
diff --git a/sbin/dhclient/osdep.h b/sbin/dhclient/osdep.h
index fcf07387dce..40d8b1e1117 100644
--- a/sbin/dhclient/osdep.h
+++ b/sbin/dhclient/osdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: osdep.h,v 1.4 2004/02/04 12:16:56 henning Exp $ */
+/* $OpenBSD: osdep.h,v 1.5 2004/02/07 13:59:45 henning Exp $ */
/* Operating system dependencies... */
@@ -123,8 +123,8 @@ extern int h_errno;
Currently, all low-level packet interfaces use BSD sockets as a
fallback. */
-#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \
- defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || defined (USE_LPF_SEND)
+#if defined(USE_BPF_SEND) || defined(USE_NIT_SEND) || \
+ defined(USE_DLPI_SEND) || defined(USE_UPF_SEND) || defined(USE_LPF_SEND)
# define USE_SOCKET_FALLBACK
# define USE_FALLBACK
#endif
@@ -135,9 +135,9 @@ extern int h_errno;
and need to be able to assemble packets, add the USE_XXX_SEND
definition for your interface to the list tested below. */
-#if defined (USE_RAW_SEND) || defined (USE_BPF_SEND) || \
- defined (USE_NIT_SEND) || defined (USE_UPF_SEND) || \
- defined (USE_DLPI_SEND) || defined (USE_LPF_SEND)
+#if defined(USE_RAW_SEND) || defined(USE_BPF_SEND) || \
+ defined(USE_NIT_SEND) || defined(USE_UPF_SEND) || \
+ defined(USE_DLPI_SEND) || defined(USE_LPF_SEND)
# define PACKET_ASSEMBLY
#endif
@@ -147,11 +147,10 @@ extern int h_errno;
and need to be able to decode raw packets, add the USE_XXX_RECEIVE
definition for your interface to the list tested below. */
-#if defined (USE_RAW_RECEIVE) || defined (USE_BPF_SEND) || \
- defined (USE_NIT_RECEIVE) || defined (USE_UPF_RECEIVE) || \
- defined (USE_DLPI_RECEIVE) || \
- defined (USE_LPF_SEND) || \
- (defined (USE_SOCKET_SEND) && defined (SO_BINDTODEVICE))
+#if defined(USE_RAW_RECEIVE) || defined(USE_BPF_SEND) || \
+ defined(USE_NIT_RECEIVE) || defined(USE_UPF_RECEIVE) || \
+ defined(USE_DLPI_RECEIVE) || defined(USE_LPF_SEND) || \
+ (defined(USE_SOCKET_SEND) && defined(SO_BINDTODEVICE))
# define PACKET_DECODING
#endif
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index 2eff01142a7..c166a0bafc5 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.4 2004/02/07 13:26:35 henning Exp $ */
+/* $OpenBSD: parse.c,v 1.5 2004/02/07 13:59:45 henning Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -618,15 +618,15 @@ parse_date(FILE *cfile)
/* Guess the time value... */
guess = ((((((365 * (tm.tm_year - 70) + /* Days in years since '70 */
- (tm.tm_year - 69) / 4 + /* Leap days since '70 */
- (tm.tm_mon /* Days in months this year */
- ? months[tm.tm_mon - 1]
- : 0) +
- (tm.tm_mon > 1 && /* Leap day this year */
- !((tm.tm_year - 72) & 3)) +
- tm.tm_mday - 1) * 24) + /* Day of month */
+ (tm.tm_year - 69) / 4 + /* Leap days since '70 */
+ (tm.tm_mon /* Days in months this year */
+ ? months[tm.tm_mon - 1]
+ : 0) +
+ (tm.tm_mon > 1 && /* Leap day this year */
+ !((tm.tm_year - 72) & 3)) +
+ tm.tm_mday - 1) * 24) + /* Day of month */
tm.tm_hour) * 60) +
- tm.tm_min) * 60) + tm.tm_sec;
+ tm.tm_min) * 60) + tm.tm_sec;
/*
* This guess could be wrong because of leap seconds or other
diff --git a/sbin/dhclient/print.c b/sbin/dhclient/print.c
index 743a816a92b..065225b06c1 100644
--- a/sbin/dhclient/print.c
+++ b/sbin/dhclient/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.3 2004/02/06 11:33:22 henning Exp $ */
+/* $OpenBSD: print.c,v 1.4 2004/02/07 13:59:45 henning Exp $ */
/* Turn data structures into printable text. */
@@ -62,7 +62,7 @@ print_hw_addr(int htype, int hlen, unsigned char *data)
s += strlen(s);
slen -= strlen(s) + 1;
- *s++ = ':';
+ *s++ = ':';
}
*--s = 0;
}
diff --git a/sbin/dhclient/socket.c b/sbin/dhclient/socket.c
index 7428fe97386..40bdb3568f1 100644
--- a/sbin/dhclient/socket.c
+++ b/sbin/dhclient/socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: socket.c,v 1.4 2004/02/07 13:26:35 henning Exp $ */
+/* $OpenBSD: socket.c,v 1.5 2004/02/07 13:59:45 henning Exp $ */
/* BSD socket interface code... */
@@ -110,7 +110,7 @@ if_register_fallback(struct interface_info *info)
info->name,
(info->shared_network ? "/" : ""),
(info->shared_network ?
- info->shared_network -> name : ""));
+ info->shared_network -> name : ""));
}
ssize_t
diff --git a/sbin/dhclient/tree.c b/sbin/dhclient/tree.c
index 5aafc01767a..37431bedb28 100644
--- a/sbin/dhclient/tree.c
+++ b/sbin/dhclient/tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tree.c,v 1.4 2004/02/07 13:26:35 henning Exp $ */
+/* $OpenBSD: tree.c,v 1.5 2004/02/07 13:59:45 henning Exp $ */
/* Routines for manipulating parse trees... */
@@ -295,8 +295,8 @@ do_host_lookup(int *bufix, unsigned char **bufp, int *bufcount,
if (cur_time <= dns->timeout) {
#ifdef DEBUG_EVAL
debug("easy copy: %x %d %x",
- dns->data, dns->data_len,
- dns->data ? *(int *)(dns->data) : 0);
+ dns->data, dns->data_len,
+ dns->data ? *(int *)(dns->data) : 0);
#endif
do_data_copy(bufix, bufp, bufcount,
dns->data, dns->data_len);
@@ -309,7 +309,7 @@ do_host_lookup(int *bufix, unsigned char **bufp, int *bufcount,
/* Otherwise, look it up... */
h = gethostbyname(dns->hostname);
if (h == NULL) {
- switch(h_errno) {
+ switch (h_errno) {
case HOST_NOT_FOUND:
warn("%s: host unknown.", dns->hostname);
break;