summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-09-15 18:15:19 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-09-15 18:15:19 +0000
commitcda9108e72a0e53ca98317cf26f755763f331b0a (patch)
tree849094f9b36ae143ead80cec62df341d44062cf2
parent6925ec5238a7a84f51ef7d1886dbadf6daa51466 (diff)
no \n in error() calls and minor KNF, from Moritz Jodeit <moritz@jodeit.org>
-rw-r--r--sbin/dhclient/clparse.c8
-rw-r--r--sbin/dhclient/dhclient.c7
-rw-r--r--sbin/dhclient/dispatch.c4
-rw-r--r--sbin/dhclient/options.c4
4 files changed, 11 insertions, 12 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index a448ddad742..2777902c776 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.17 2004/08/24 15:06:03 henning Exp $ */
+/* $OpenBSD: clparse.c,v 1.18 2004/09/15 18:15:18 henning Exp $ */
/* Parser for dhclient config and lease files... */
@@ -453,7 +453,7 @@ make_client_state(struct interface_info *ip)
{
ip->client = malloc(sizeof(*(ip->client)));
if (!ip->client)
- error("no memory for state on %s\n", ip->name);
+ error("no memory for state on %s", ip->name);
memset(ip->client, 0, sizeof(*(ip->client)));
}
@@ -462,7 +462,7 @@ make_client_config(struct interface_info *ip, struct client_config *config)
{
ip->client->config = malloc(sizeof(struct client_config));
if (!ip->client->config)
- error("no memory for config for %s\n", ip->name);
+ error("no memory for config for %s", ip->name);
memset(ip->client->config, 0, sizeof(*(ip->client->config)));
memcpy(ip->client->config, config, sizeof(*config));
}
@@ -493,7 +493,7 @@ parse_client_lease_statement(FILE *cfile, int is_static)
lease = malloc(sizeof(struct client_lease));
if (!lease)
- error("no memory for lease.\n");
+ error("no memory for lease.");
memset(lease, 0, sizeof(*lease));
lease->is_static = is_static;
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index acb549418fc..005c91df9e5 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.58 2004/08/30 07:43:32 otto Exp $ */
+/* $OpenBSD: dhclient.c,v 1.59 2004/09/15 18:15:18 henning Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -1767,7 +1767,7 @@ priv_script_init(char *reason, char *medium)
if (ip->client->scriptEnv == NULL)
error("script_init: no memory for environment");
- ip->client->scriptEnv[0]=strdup(CLIENT_PATH);
+ ip->client->scriptEnv[0] = strdup(CLIENT_PATH);
if (ip->client->scriptEnv[0] == NULL)
error("script_init: no memory for environment");
@@ -2030,7 +2030,6 @@ priv_script_go(void)
} else {
execve(scriptName, argv, envp);
error("execve (%s, ...): %m", scriptName);
- exit(0);
}
if (ip)
@@ -2305,7 +2304,7 @@ option_as_string(unsigned int code, unsigned char *data, int len)
unsigned char *dp = data;
if (code > 255)
- error("option_as_string: bad code %d\n", code);
+ error("option_as_string: bad code %d", code);
for (; dp < data + len; dp++) {
if (!isascii(*dp) || !isprint(*dp)) {
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index 690985c53ec..d7d4a2a2105 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.29 2004/06/22 01:10:49 canacar Exp $ */
+/* $OpenBSD: dispatch.c,v 1.30 2004/09/15 18:15:18 henning Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -468,7 +468,7 @@ interface_link_status(char *ifname)
struct ifmediareq ifmr;
int sock;
- if ((sock = socket (AF_INET, SOCK_DGRAM, 0)) == -1)
+ if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
error("Can't create socket");
memset(&ifmr, 0, sizeof(ifmr));
diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c
index b6e571fa456..e0a06dc013d 100644
--- a/sbin/dhclient/options.c
+++ b/sbin/dhclient/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.11 2004/05/06 22:29:15 deraadt Exp $ */
+/* $OpenBSD: options.c,v 1.12 2004/09/15 18:15:18 henning Exp $ */
/* DHCP options parsing and reassembly. */
@@ -458,7 +458,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
/* Code should be between 0 and 255. */
if (code > 255)
- error("pretty_print_option: bad code %d\n", code);
+ error("pretty_print_option: bad code %d", code);
if (emit_commas)
comma = ',';