Various KNF nits.
authorkrw <krw@openbsd.org>
Mon, 19 Jun 2017 19:28:35 +0000 (19:28 +0000)
committerkrw <krw@openbsd.org>
Mon, 19 Jun 2017 19:28:35 +0000 (19:28 +0000)
sbin/dhclient/bpf.c
sbin/dhclient/dhclient.c
sbin/dhclient/dispatch.c
sbin/dhclient/parse.c

index ffb7f1d..6da8a26 100644 (file)
@@ -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) {
index d883899..1715dd3 100644 (file)
@@ -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);
index 57ed6b2..2cadceb 100644 (file)
@@ -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;
index 6604e5c..d1f5bb2 100644 (file)
@@ -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);