summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-06-19 19:28:36 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-06-19 19:28:36 +0000
commit6d76c4c10c7d583e5361ebad216894dc4cbde3de (patch)
tree77420cf5c07c3fb36ec7bcf871425319d4dbee67
parent3c1f1e6f4c0afafc3a8048ef00b3c175e564c90a (diff)
Various KNF nits.
-rw-r--r--sbin/dhclient/bpf.c6
-rw-r--r--sbin/dhclient/dhclient.c12
-rw-r--r--sbin/dhclient/dispatch.c6
-rw-r--r--sbin/dhclient/parse.c4
4 files changed, 14 insertions, 14 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index ffb7f1d5606..6da8a26f76c 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.52 2017/06/14 15:57:25 krw Exp $ */
+/* $OpenBSD: bpf.c,v 1.53 2017/06/19 19:28:35 krw Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
@@ -395,7 +395,7 @@ receive_packet(struct interface_info *ifi, struct sockaddr_in *from,
/* Decode the physical header. */
offset = decode_hw_header(ifi->rbuf + ifi->rbuf_offset,
- hdr.bh_caplen, hfrom);
+ hdr.bh_caplen, hfrom);
/*
* If a physical layer checksum failed (dunno of any
@@ -412,7 +412,7 @@ receive_packet(struct interface_info *ifi, struct sockaddr_in *from,
/* Decode the IP and UDP headers. */
offset = decode_udp_ip_header(ifi->rbuf + ifi->rbuf_offset,
- hdr.bh_caplen, from);
+ hdr.bh_caplen, from);
/* If the IP or UDP checksum was bad, skip the packet. */
if (offset < 0) {
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index d883899c5f4..1715dd347ca 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.438 2017/06/19 01:09:09 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.439 2017/06/19 19:28:35 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -426,11 +426,11 @@ routehandler(struct interface_info *ifi)
write_resolv_conf(ifi->active->resolv_conf,
strlen(ifi->active->resolv_conf));
- done:
+done:
free(rtmmsg);
return;
- die:
+die:
if (rslt == -1)
fatalx("no memory for errmsg");
fatalx("%s", errmsg);
@@ -1105,7 +1105,7 @@ newlease:
if (lease->is_static)
break;
if (ifi->active == NULL)
- continue;
+ continue;
if (ifi->active->ssid_len != lease->ssid_len)
continue;
if (memcmp(ifi->active->ssid, lease->ssid, lease->ssid_len)
@@ -1323,7 +1323,7 @@ packet_to_lease(struct interface_info *ifi, struct option_data *options)
}
return lease;
- decline:
+decline:
make_decline(ifi, lease);
send_decline(ifi);
free_client_lease(lease);
@@ -2120,7 +2120,7 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2)
if (quit == SIGHUP) {
if (!(ifi->flags & IFI_HUP) &&
- (!(ifi->flags & IFI_NEW_LLADDR)))
+ (!(ifi->flags & IFI_NEW_LLADDR)))
log_warnx("%s; restarting.", strsignal(quit));
signal(SIGHUP, SIG_IGN); /* will be restored after exec */
execvp(saved_argv[0], saved_argv);
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index 57ed6b2230e..2cadceb3eaf 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.124 2017/06/18 21:08:15 krw Exp $ */
+/* $OpenBSD: dispatch.c,v 1.125 2017/06/19 19:28:35 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -297,12 +297,12 @@ get_rdomain(char *name)
struct ifreq ifr;
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
- fatal("get_rdomain socket");
+ fatal("get_rdomain socket");
memset(&ifr, 0, sizeof(ifr));
strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
if (ioctl(s, SIOCGIFRDOMAIN, (caddr_t)&ifr) != -1)
- rv = ifr.ifr_rdomainid;
+ rv = ifr.ifr_rdomainid;
close(s);
return rv;
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index 6604e5c8c0d..d1f5bb2140d 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.51 2017/06/10 17:56:29 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.52 2017/06/19 19:28:35 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -253,7 +253,7 @@ parse_ethernet(FILE *cfile, struct ether_addr *hardware)
if (len == 6) {
if (parse_semi(cfile))
- memcpy(hardware, &buf, sizeof(*hardware));
+ memcpy(hardware, &buf, sizeof(*hardware));
} else if (token != ':') {
parse_warn("expecting ':'.");
skip_to_semi(cfile);