diff options
author | 2017-02-12 13:55:01 +0000 | |
---|---|---|
committer | 2017-02-12 13:55:01 +0000 | |
commit | 833082e50c02e6702b017ae2225f43669d2c5fd7 (patch) | |
tree | 9f768bbd088632aa1c64c73d4040d60e9c32b931 | |
parent | Remove now unused file. (diff) | |
download | wireguard-openbsd-833082e50c02e6702b017ae2225f43669d2c5fd7.tar.xz wireguard-openbsd-833082e50c02e6702b017ae2225f43669d2c5fd7.zip |
Adjust lines that are too long.
-rw-r--r-- | sbin/dhclient/bpf.c | 5 | ||||
-rw-r--r-- | sbin/dhclient/clparse.c | 9 | ||||
-rw-r--r-- | sbin/dhclient/dhclient.c | 49 | ||||
-rw-r--r-- | sbin/dhclient/dispatch.c | 6 | ||||
-rw-r--r-- | sbin/dhclient/kroute.c | 12 | ||||
-rw-r--r-- | sbin/dhclient/options.c | 24 |
6 files changed, 60 insertions, 45 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c index 12278f6256f..af29ad03df3 100644 --- a/sbin/dhclient/bpf.c +++ b/sbin/dhclient/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.45 2017/02/12 13:15:50 krw Exp $ */ +/* $OpenBSD: bpf.c,v 1.46 2017/02/12 13:55:01 krw Exp $ */ /* BPF socket interface code, originally contributed by Archie Cobbs. */ @@ -201,7 +201,8 @@ if_register_receive(struct interface_info *ifi) if (v.bv_major != BPF_MAJOR_VERSION || v.bv_minor < BPF_MINOR_VERSION) - fatalx("Kernel BPF version out of range - recompile dhclient!"); + fatalx("Kernel BPF version out of range - recompile " + "dhclient!"); /* * Set immediate mode so that reads return as soon as a packet diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index 443adeed079..1281a326ac2 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.104 2017/02/12 13:15:50 krw Exp $ */ +/* $OpenBSD: clparse.c,v 1.105 2017/02/12 13:55:01 krw Exp $ */ /* Parser for dhclient config and lease files. */ @@ -463,7 +463,8 @@ parse_interface_declaration(FILE *cfile, struct interface_info *ifi) * client-lease-declarations client-lease-declaration */ void -parse_client_lease_statement(FILE *cfile, int is_static, struct interface_info *ifi) +parse_client_lease_statement(FILE *cfile, int is_static, + struct interface_info *ifi) { struct client_state *client = ifi->client; struct client_lease *lease, *lp, *pl; @@ -767,8 +768,8 @@ bad_flag: dp = cidr; goto alloc; default: - log_warnx("Bad format %c in parse_option_param.", - *fmt); + log_warnx("Bad format %c in " + "parse_option_param.", *fmt); skip_to_semi(cfile); return (-1); } diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 090f55e550d..41c2258f9bb 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.395 2017/02/12 13:15:50 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.396 2017/02/12 13:55:01 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -696,8 +696,8 @@ usage(void) extern char *__progname; fprintf(stderr, - "usage: %s [-d | -q] [-u] [-c file] [-i options] [-L file] [-l file] " - "interface\n", __progname); + "usage: %s [-d | -q] [-u] [-c file] [-i options] [-L file] " + "[-l file] interface\n", __progname); exit(1); } @@ -808,7 +808,8 @@ state_reboot(void *xifi) } /* - * Called when a lease has completely expired and we've been unable to renew it. + * Called when a lease has completely expired and we've been unable to + * renew it. */ void state_init(void *xifi) @@ -987,8 +988,8 @@ bind_lease(struct interface_info *ifi) client->new->rebind = lease->rebind; /* - * A duplicate lease once we are responsible & S_RENEWING means we don't - * need to change the interface, routing table or resolv.conf. + * A duplicate lease once we are responsible & S_RENEWING means we + * don't need to change the interface, routing table or resolv.conf. */ if ((client->flags & IS_RESPONSIBLE) && client->state == S_RENEWING && compare_lease(client->active, client->new) == 0) { @@ -1178,10 +1179,10 @@ dhcpoffer(struct interface_info *ifi, struct in_addr client_addr, if (TAILQ_EMPTY(&client->offered_leases)) { TAILQ_INSERT_HEAD(&client->offered_leases, lease, next); } else if (lease->address.s_addr == client->requested_address.s_addr) { - /* The lease we expected - put it at the head of the list. */ + /* The expected lease - put it at the head of the list. */ TAILQ_INSERT_HEAD(&client->offered_leases, lease, next); } else { - /* Not the lease we expected - put it at the end of the list. */ + /* Not the expected lease - put it at the end of the list. */ TAILQ_INSERT_TAIL(&client->offered_leases, lease, next); } @@ -1491,7 +1492,8 @@ state_panic(void *xifi) continue; if (lp->is_static) { set_lease_times(lp); - log_info("Trying static lease %s", inet_ntoa(lp->address)); + log_info("Trying static lease %s", + inet_ntoa(lp->address)); } else if (lp->expiry <= cur_time) { continue; } else @@ -1541,7 +1543,8 @@ send_request(void *xifi) * reused our old address. In the former case, we're hosed * anyway. This is not a win-prone situation. */ - if (client->state == S_REBOOTING && interval > config->reboot_timeout) { + if (client->state == S_REBOOTING && interval > + config->reboot_timeout) { client->state = S_INIT; cancel_timeout(); state_init(ifi); @@ -2223,7 +2226,7 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2) } if (n == 0) { - /* Connection closed -- other end should log message. */ + /* Connection closed - other end should log message. */ quit = INTERNALSIG; continue; } @@ -2238,8 +2241,8 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2) /* Truncate the file so monitoring process see exit. */ rslt = truncate(path_option_db, 0); if (rslt == -1) - log_warnx("Unable to truncate '%s': %s", path_option_db, - strerror(errno)); + log_warnx("Unable to truncate '%s': %s", + path_option_db, strerror(errno)); } /* @@ -2314,8 +2317,9 @@ get_ifname(struct interface_info *ifi, char *arg) * Update resolv.conf. */ char * -resolv_conf_contents(struct interface_info *ifi, struct option_data *domainname, - struct option_data *nameservers, struct option_data *domainsearch) +resolv_conf_contents(struct interface_info *ifi, + struct option_data *domainname, struct option_data *nameservers, + struct option_data *domainsearch) { char *dn, *ns, *nss[MAXNS], *contents, *courtesy, *p, *buf; size_t len; @@ -2573,7 +2577,8 @@ clone_lease(struct client_lease *oldlease) if (oldlease->options[i].len == 0) continue; newlease->options[i].len = oldlease->options[i].len; - newlease->options[i].data = calloc(1, newlease->options[i].len); + newlease->options[i].data = calloc(1, + newlease->options[i].len); if (newlease->options[i].data == NULL) goto cleanup; memcpy(newlease->options[i].data, oldlease->options[i].data, @@ -2639,7 +2644,8 @@ write_resolv_conf(u_int8_t *contents, size_t sz) rslt = imsg_compose(unpriv_ibuf, IMSG_WRITE_RESOLV_CONF, 0, 0, -1, contents, sz); if (rslt == -1) - log_warnx("write_resolv_conf: imsg_compose: %s", strerror(errno)); + log_warnx("write_resolv_conf: imsg_compose: %s", + strerror(errno)); flush_unpriv_ibuf("write_resolv_conf"); } @@ -2652,7 +2658,8 @@ write_option_db(u_int8_t *contents, size_t sz) rslt = imsg_compose(unpriv_ibuf, IMSG_WRITE_OPTION_DB, 0, 0, -1, contents, sz); if (rslt == -1) - log_warnx("write_option_db: imsg_compose: %s", strerror(errno)); + log_warnx("write_option_db: imsg_compose: %s", + strerror(errno)); flush_unpriv_ibuf("write_option_db"); } @@ -2735,7 +2742,8 @@ priv_write_file(char *path, int flags, mode_t mode, * route add -net $dest -netmask $mask -cloning -iface $iface */ void -add_direct_route(struct in_addr dest, struct in_addr mask, struct in_addr iface) +add_direct_route(struct in_addr dest, struct in_addr mask, + struct in_addr iface) { struct in_addr ifa = { INADDR_ANY }; @@ -2927,7 +2935,8 @@ set_lease_times(struct client_lease *lease) lease->rebind = (lease->expiry * 7) / 8; if (lease->options[DHO_DHCP_REBINDING_TIME].len == sizeof(uint32val)) { - memcpy(&uint32val, lease->options[DHO_DHCP_REBINDING_TIME].data, + memcpy(&uint32val, + lease->options[DHO_DHCP_REBINDING_TIME].data, sizeof(uint32val)); lease->rebind = ntohl(uint32val); if (lease->rebind > lease->expiry) diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index c6a0981eb6f..e3b159a7635 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.113 2017/02/12 13:15:50 krw Exp $ */ +/* $OpenBSD: dispatch.c,v 1.114 2017/02/12 13:55:01 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -243,8 +243,8 @@ interface_link_forceup(char *ifname) /* Force it down and up so others notice link state change. */ ifr.ifr_flags &= ~IFF_UP; if (ioctl(sock, SIOCSIFFLAGS, (caddr_t)&ifr) == -1) { - log_info("interface_link_forceup: SIOCSIFFLAGS DOWN failed (%s)", - strerror(errno)); + log_info("interface_link_forceup: SIOCSIFFLAGS DOWN " + "failed (%s)", strerror(errno)); return; } diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index 53dee2b7129..56c9a0a3cd9 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.82 2017/02/12 13:15:50 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.83 2017/02/12 13:55:01 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -415,7 +415,8 @@ set_interface_mtu(int mtu) rslt = imsg_compose(unpriv_ibuf, IMSG_SET_INTERFACE_MTU, 0, 0, -1, &imsg, sizeof(imsg)); if (rslt == -1) - log_warnx("set_interface_mtu: imsg_compose: %s", strerror(errno)); + log_warnx("set_interface_mtu: imsg_compose: %s", + strerror(errno)); flush_unpriv_ibuf("set_interface_mtu"); } @@ -618,7 +619,8 @@ resolv_conf_priority(struct interface_info *ifi) do { len = read(s, &m_rtmsg, sizeof(m_rtmsg)); if (len == -1) { - log_warnx("get default route read: %s", strerror(errno)); + log_warnx("get default route read: %s", + strerror(errno)); break; } else if (len == 0) { log_warnx("no data from default route read"); @@ -668,8 +670,8 @@ create_route_label(struct sockaddr_rtlabel *label) } if (len >= sizeof(label->sr_label)) { - log_warnx("creating route label: label too long (%d vs %zu)", len, - sizeof(label->sr_label)); + log_warnx("creating route label: label too long (%d vs %zu)", + len, sizeof(label->sr_label)); return (1); } diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c index af2bef35651..533fa603b8a 100644 --- a/sbin/dhclient/options.c +++ b/sbin/dhclient/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.80 2017/02/12 13:15:50 krw Exp $ */ +/* $OpenBSD: options.c,v 1.81 2017/02/12 13:55:01 krw Exp $ */ /* DHCP options parsing and reassembly. */ @@ -480,8 +480,8 @@ pretty_print_option(unsigned int code, struct option_data *option, /* Figure out the size of the data. */ for (i = 0; dhcp_options[code].format[i]; i++) { if (!numhunk) { - log_warnx("%s: Excess information in format string: %s", - dhcp_options[code].name, + log_warnx("%s: Excess information in format string: " + "%s", dhcp_options[code].name, &(dhcp_options[code].format[i])); goto done; } @@ -614,7 +614,8 @@ pretty_print_option(unsigned int code, struct option_data *option, dp++; break; default: - log_warnx("Unexpected format code %c", fmtbuf[j]); + log_warnx("Unexpected format code %c", + fmtbuf[j]); goto toobig; } if (opcount >= opleft || opcount == -1) @@ -668,7 +669,8 @@ do_packet(struct interface_info *ifi, unsigned int from_port, } else if (memcmp(&ifi->hw_address, packet->chaddr, sizeof(ifi->hw_address))) { #ifdef DEBUG - log_debug("Discarding packet with chaddr != %s (%s)", ifi->name, + log_debug("Discarding packet with chaddr != %s (%s)", + ifi->name, ether_ntoa((struct ether_addr *)packet->chaddr)); #endif return; @@ -685,8 +687,8 @@ do_packet(struct interface_info *ifi, unsigned int from_port, TAILQ_FOREACH(ap, &config->reject_list, next) if (from.s_addr == ap->addr.s_addr) { #ifdef DEBUG - log_debug("Discarding packet from address on reject list " - "(%s)", inet_ntoa(from)); + log_debug("Discarding packet from address on reject " + "list (%s)", inet_ntoa(from)); #endif return; } @@ -723,8 +725,8 @@ do_packet(struct interface_info *ifi, unsigned int from_port, memcmp(options[i].data, config->send_options[i].data, options[i].len) != 0)) { #ifdef DEBUG - log_debug("Discarding packet with client-identifier '%s'", - pretty_print_option(i, &options[i], 0)); + log_debug("Discarding packet with client-identifier " + "'%s'", pretty_print_option(i, &options[i], 0)); #endif goto done; } @@ -750,8 +752,8 @@ do_packet(struct interface_info *ifi, unsigned int from_port, break; default: #ifdef DEBUG - log_debug("Discarding DHCP packet of unknown type (%d)", - options[DHO_DHCP_MESSAGE_TYPE].data[0]); + log_debug("Discarding DHCP packet of unknown type " + "(%d)", options[DHO_DHCP_MESSAGE_TYPE].data[0]); #endif break; } |