aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/files.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-18 19:51:32 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-18 19:51:32 +0000
commit5a3395bc01cd4b11309595a6ecdaf32f8279f378 (patch)
tree1e63aa591a05e9ec75aefdcd639ca4188e583648 /networking/udhcp/files.c
parentabfc4cf6d8b9c59724aceb70df5081a1368fdb62 (diff)
downloadbusybox-5a3395bc01cd4b11309595a6ecdaf32f8279f378.tar.gz
udhcp: fix indentation and style.
Eliminate (group) a lot of smallish *.h files Remove lots of unneeded #includes
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r--networking/udhcp/files.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 36bcc31d9..317e861c0 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -4,21 +4,12 @@
* Rewrite by Russ Dill <Russ.Dill@asu.edu> July 2001
*/
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <ctype.h>
-#include <netdb.h>
-
#include <netinet/ether.h>
-#include "static_leases.h"
+#include "common.h"
#include "dhcpd.h"
#include "options.h"
-#include "files.h"
-#include "common.h"
+
/*
* Domain names may have 254 chars, and string options can be 254
@@ -51,7 +42,7 @@ static int read_mac(const char *line, void *arg)
temp_ether_addr = ether_aton(line);
- if(temp_ether_addr == NULL)
+ if (temp_ether_addr == NULL)
retval = 0;
else
memcpy(mac_bytes, temp_ether_addr, 6);
@@ -217,7 +208,6 @@ static int read_opt(const char *const_line, void *arg)
static int read_staticlease(const char *const_line, void *arg)
{
-
char *line;
char *mac_string;
char *ip_string;
@@ -243,7 +233,6 @@ static int read_staticlease(const char *const_line, void *arg)
if (ENABLE_FEATURE_UDHCP_DEBUG) printStaticLeases(arg);
return 1;
-
}
@@ -308,9 +297,9 @@ int read_config(const char *file)
for (i = 0; keywords[i].keyword[0]; i++)
if (!strcasecmp(token, keywords[i].keyword))
if (!keywords[i].handler(line, keywords[i].var)) {
- bb_error_msg("failure parsing line %d of %s", lm, file);
+ bb_error_msg("cannot parse line %d of %s", lm, file);
if (ENABLE_FEATURE_UDHCP_DEBUG)
- bb_error_msg("unable to parse '%s'", debug_orig);
+ bb_error_msg("cannot parse '%s'", debug_orig);
/* reset back to the default value */
keywords[i].handler(keywords[i].def, keywords[i].var);
}