From d74625fe3d9f16d01ca98b785d1140308f2c0a7d Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 30 May 2017 18:18:08 +0000 Subject: [PATCH] whitespace encountered during review --- usr.sbin/slaacctl/slaacctl.c | 4 ++-- usr.sbin/slaacd/engine.c | 28 +++++++++++++--------------- usr.sbin/slaacd/frontend.c | 8 ++++---- usr.sbin/slaacd/slaacd.c | 6 +++--- 4 files changed, 22 insertions(+), 24 deletions(-) diff --git a/usr.sbin/slaacctl/slaacctl.c b/usr.sbin/slaacctl/slaacctl.c index 51b4e947f47..6668ab10d2b 100644 --- a/usr.sbin/slaacctl/slaacctl.c +++ b/usr.sbin/slaacctl/slaacctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slaacctl.c,v 1.6 2017/05/28 09:35:56 florian Exp $ */ +/* $OpenBSD: slaacctl.c,v 1.7 2017/05/30 18:18:08 deraadt Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -179,7 +179,7 @@ show_interface_msg(struct imsg *imsg) struct tm *t; struct timespec now, diff; char buf[IF_NAMESIZE], *bufp; - char hbuf[NI_MAXHOST], whenbuf[255]; + char hbuf[NI_MAXHOST], whenbuf[255]; char ntopbuf[INET6_ADDRSTRLEN]; switch (imsg->hdr.type) { diff --git a/usr.sbin/slaacd/engine.c b/usr.sbin/slaacd/engine.c index 6aa7ba83064..2c594731201 100644 --- a/usr.sbin/slaacd/engine.c +++ b/usr.sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.34 2017/05/30 15:57:12 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.35 2017/05/30 18:18:08 deraadt Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -22,7 +22,7 @@ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,7 +34,7 @@ * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -236,7 +236,7 @@ void configure_dfr(struct dfr_proposal *); void withdraw_dfr(struct dfr_proposal *); void debug_log_ra(struct imsg_ra *); char *parse_dnssl(char *, int); -void update_iface_ra(struct slaacd_iface *, struct radv *); +void update_iface_ra(struct slaacd_iface *, struct radv *); void send_proposal(struct imsg_proposal *); void start_probe(struct slaacd_iface *); void address_proposal_timeout(int, short, void *); @@ -432,7 +432,7 @@ engine_dispatch_frontend(int fd, short event, void *bula) "privacy: %s", __func__, imsg_ifinfo.if_index, ether_ntoa(&imsg_ifinfo.hw_address), imsg_ifinfo.running ? "yes" : "no", - imsg_ifinfo.autoconfprivacy ? "yes" : "no" ); + imsg_ifinfo.autoconfprivacy ? "yes" : "no"); iface = get_slaacd_iface_by_id(imsg_ifinfo.if_index); if (iface == NULL) { @@ -492,7 +492,7 @@ engine_dispatch_frontend(int fd, short event, void *bula) NULL)) evtimer_del(&iface->timer); } - + memcpy(&iface->ll_address, &imsg_ifinfo.ll_address, sizeof(struct sockaddr_in6)); @@ -732,7 +732,7 @@ send_interface_info(struct slaacd_iface *iface, pid_t pid) cei_ra.reachable_time = ra->reachable_time; cei_ra.retrans_time = ra->retrans_time; engine_imsg_compose_frontend(IMSG_CTL_SHOW_INTERFACE_INFO_RA, - pid, &cei_ra, sizeof(cei_ra)); + pid, &cei_ra, sizeof(cei_ra)); LIST_FOREACH(prefix, &ra->prefixes, entries) { memset(&cei_ra_prefix, 0, sizeof(cei_ra_prefix)); @@ -1156,7 +1156,7 @@ gen_addr(struct slaacd_iface *iface, struct radv_prefix *prefix, struct #define EUI64_GBIT 0x01 #define EUI64_UBIT 0x02 - if (privacy) { + if (privacy) { arc4random_buf(&priv_in6.s6_addr32[2], 8); priv_in6.s6_addr[8] &= ~EUI64_GBIT; /* g bit to "individual" */ priv_in6.s6_addr[8] |= EUI64_UBIT; /* u bit to "local" */ @@ -1207,7 +1207,7 @@ gen_addr(struct slaacd_iface *iface, struct radv_prefix *prefix, struct ~addr_proposal->mask.s6_addr32[3]); } -#undef s6_addr32 +#undef s6_addr32 } /* from sys/netinet6/in6.c */ @@ -1447,7 +1447,7 @@ parse_dnssl(char* data, int datalen) return NULL; } if (len == 0) { - if ( pos < datalen && data[pos + 1] != 0) + if (pos < datalen && data[pos + 1] != 0) *nsslp++ = ' '; /* seperator for next domain */ else break; @@ -1539,8 +1539,8 @@ void update_iface_ra(struct slaacd_iface *iface, struct radv *ra) sizeof(hbuf)); } log_debug("%s: iface %d: %s", - __func__, iface->if_index, - hbuf); + __func__, iface->if_index, + hbuf); break; } } @@ -2065,7 +2065,7 @@ iface_timeout(int fd, short events, void *arg) tv.tv_usec = arc4random_uniform(1000000); evtimer_add(&iface->timer, &tv); } - break; + break; case IF_DOWN: case IF_IDLE: default: @@ -2085,7 +2085,6 @@ find_ra(struct slaacd_iface *iface, struct sockaddr_in6 *from) } return (NULL); - } struct address_proposal* @@ -2153,7 +2152,6 @@ find_prefix(struct slaacd_iface *iface, struct address_proposal *addr_proposal, *result_ra = ra; *result_prefix = prefix; } - } } } diff --git a/usr.sbin/slaacd/frontend.c b/usr.sbin/slaacd/frontend.c index 9b90fc3422e..03ebe29bc44 100644 --- a/usr.sbin/slaacd/frontend.c +++ b/usr.sbin/slaacd/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.13 2017/05/29 08:59:42 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.14 2017/05/30 18:18:08 deraadt Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -229,7 +229,7 @@ frontend(int debug, int verbose, char *sockname) rs.nd_rs_reserved = 0; memset(&dst, 0, sizeof(dst)); - dst.sin6_family = AF_INET6; + dst.sin6_family = AF_INET6; if (inet_pton(AF_INET6, ALLROUTER, &dst.sin6_addr.s6_addr) != 1) fatal("inet_pton"); @@ -307,7 +307,7 @@ frontend_dispatch_main(int fd, short event, void *bula) int shut = 0; DEBUG_IMSG("%s", __func__); - + if (event & EV_READ) { if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) fatal("imsg_read error"); @@ -631,7 +631,7 @@ handle_route_message(struct rt_msghdr *rtm, struct sockaddr **rti_info) p = rl->sr_label; for (ap = argv; ap < &argv[3] && (*ap = - strsep(&p, " ")) != NULL;) { + strsep(&p, " ")) != NULL;) { if (**ap != '\0') ap++; } diff --git a/usr.sbin/slaacd/slaacd.c b/usr.sbin/slaacd/slaacd.c index 3ad2ef121d9..5d0c0933288 100644 --- a/usr.sbin/slaacd/slaacd.c +++ b/usr.sbin/slaacd/slaacd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slaacd.c,v 1.21 2017/05/30 15:39:49 florian Exp $ */ +/* $OpenBSD: slaacd.c,v 1.22 2017/05/30 18:18:08 deraadt Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -223,7 +223,7 @@ main(int argc, char *argv[]) pipe_main2frontend[1], debug, cmd_opts & OPT_VERBOSE, csock); slaacd_process = PROC_MAIN; - + log_procinit(log_procnames[slaacd_process]); if ((routesock = socket(PF_ROUTE, SOCK_RAW | SOCK_CLOEXEC | @@ -661,7 +661,7 @@ configure_interface(struct imsg_configure_address *address) } memcpy(&in6_addreq.ifra_addr, &address->addr, - sizeof(in6_addreq.ifra_addr)); + sizeof(in6_addreq.ifra_addr)); memcpy(&in6_addreq.ifra_prefixmask.sin6_addr, &address->mask, sizeof(in6_addreq.ifra_prefixmask.sin6_addr)); in6_addreq.ifra_prefixmask.sin6_family = AF_INET6; -- 2.20.1