From 6e2789353e63726d2af489c1e3b0978c982f6b71 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 9 Dec 2011 20:12:15 +0100 Subject: [PATCH] Fix various whitespace and indent issues (no functional change). --- bin/pax/tables.c | 11 +++++------ games/rogue/use.c | 11 +++++++---- sbin/atm/ilmid/ilmid.c | 3 +-- sbin/hammer/ondisk.c | 12 +++++------- sbin/ifconfig/af_inet6.c | 4 ++-- test/stress/stress2/testcases/shm/shm.c | 2 +- tools/tools/ath/athprom/athprom.c | 4 ++-- usr.bin/lex/yylex.c | 3 +-- usr.bin/rpcgen/rpc_svcout.c | 3 +-- usr.bin/systat/netcmds.c | 18 ++++++++++-------- usr.sbin/IPXrouted/startup.c | 3 +-- usr.sbin/installer/dfuibe_installer/flow.c | 2 +- usr.sbin/rtadvd/rtadvd.c | 3 +-- 13 files changed, 38 insertions(+), 41 deletions(-) diff --git a/bin/pax/tables.c b/bin/pax/tables.c index 658823f490..5a030a80ba 100644 --- a/bin/pax/tables.c +++ b/bin/pax/tables.c @@ -36,7 +36,6 @@ * * @(#)tables.c 8.1 (Berkeley) 5/31/93 * $FreeBSD: src/bin/pax/tables.c,v 1.13.2.1 2001/08/01 05:03:12 obrien Exp $ - * $DragonFly: src/bin/pax/tables.c,v 1.7 2006/09/27 21:58:08 pavalos Exp $ */ #include @@ -106,7 +105,7 @@ lnk_start(void) { if (ltab != NULL) return(0); - if ((ltab = (HRDLNK **)calloc(L_TAB_SZ, sizeof(HRDLNK *))) == NULL) { + if ((ltab = (HRDLNK **)calloc(L_TAB_SZ, sizeof(HRDLNK *))) == NULL) { paxwarn(1, "Cannot allocate memory for hard link table"); return(-1); } @@ -332,7 +331,7 @@ ftime_start(void) if (ftab != NULL) return(0); - if ((ftab = (FTM **)calloc(F_TAB_SZ, sizeof(FTM *))) == NULL) { + if ((ftab = (FTM **)calloc(F_TAB_SZ, sizeof(FTM *))) == NULL) { paxwarn(1, "Cannot allocate memory for file time table"); return(-1); } @@ -488,7 +487,7 @@ name_start(void) { if (ntab != NULL) return(0); - if ((ntab = (NAMT **)calloc(N_TAB_SZ, sizeof(NAMT *))) == NULL) { + if ((ntab = (NAMT **)calloc(N_TAB_SZ, sizeof(NAMT *))) == NULL) { paxwarn(1, "Cannot allocate memory for interactive rename table"); return(-1); } @@ -661,7 +660,7 @@ dev_start(void) { if (dtab != NULL) return(0); - if ((dtab = (DEVT **)calloc(D_TAB_SZ, sizeof(DEVT *))) == NULL) { + if ((dtab = (DEVT **)calloc(D_TAB_SZ, sizeof(DEVT *))) == NULL) { paxwarn(1, "Cannot allocate memory for device mapping table"); return(-1); } @@ -904,7 +903,7 @@ atdir_start(void) { if (atab != NULL) return(0); - if ((atab = (ATDIR **)calloc(A_TAB_SZ, sizeof(ATDIR *))) == NULL) { + if ((atab = (ATDIR **)calloc(A_TAB_SZ, sizeof(ATDIR *))) == NULL) { paxwarn(1,"Cannot allocate space for directory access time table"); return(-1); } diff --git a/games/rogue/use.c b/games/rogue/use.c index 73fee6f190..7a42e40c6d 100644 --- a/games/rogue/use.c +++ b/games/rogue/use.c @@ -31,7 +31,6 @@ * * @(#)use.c 8.1 (Berkeley) 5/31/93 * $FreeBSD: src/games/rogue/use.c,v 1.4 1999/11/30 03:49:29 billf Exp $ - * $DragonFly: src/games/rogue/use.c,v 1.4 2006/09/02 19:31:07 pavalos Exp $ */ /* @@ -496,9 +495,13 @@ hallucinate(void) while (obj) { ch = mvinch(obj->row, obj->col); if (((ch < 'A') || (ch > 'Z')) && - ((obj->row != rogue.row) || (obj->col != rogue.col))) - if ((ch != ' ') && (ch != '.') && (ch != '#') && (ch != '+')) { - addch(gr_obj_char()); + ((obj->row != rogue.row) || (obj->col != rogue.col))) + { + if ((ch != ' ') && (ch != '.') && (ch != '#') && + (ch != '+')) + { + addch(gr_obj_char()); + } } obj = obj->next_object; } diff --git a/sbin/atm/ilmid/ilmid.c b/sbin/atm/ilmid/ilmid.c index e4206ca072..6b9771f21f 100644 --- a/sbin/atm/ilmid/ilmid.c +++ b/sbin/atm/ilmid/ilmid.c @@ -24,7 +24,6 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sbin/atm/ilmid/ilmid.c,v 1.6.2.2 2001/03/04 07:15:30 kris Exp $ - * @(#) $DragonFly: src/sbin/atm/ilmid/ilmid.c,v 1.8 2006/10/16 00:15:35 pavalos Exp $ */ /* @@ -448,7 +447,7 @@ asn_get_pdu_len ( u_char **bufp, int *plen ) b = *bp++; if ( plen ) (*plen)--; - if ( b & 0x80 ) { + if ( b & 0x80 ) { for ( i = 0; i < (b & ~0x80); i++ ) { len = len * 256 + *bp++; if ( plen ) diff --git a/sbin/hammer/ondisk.c b/sbin/hammer/ondisk.c index 5e2a672db2..936db7e452 100644 --- a/sbin/hammer/ondisk.c +++ b/sbin/hammer/ondisk.c @@ -30,8 +30,6 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $DragonFly: src/sbin/hammer/ondisk.c,v 1.25 2008/08/21 23:28:43 thomas Exp $ */ #include @@ -279,11 +277,11 @@ get_buffer(hammer_off_t buf_offset, int isnew) buf->raw_offset); if (n != HAMMER_BUFSIZE) { if (AssertOnFailure) - err(1, "get_buffer: %s:%016llx Read failed at " - "offset %016llx", - volume->name, - (long long)buf->buf_offset, - (long long)buf->raw_offset); + err(1, "get_buffer: %s:%016llx " + "Read failed at offset %016llx", + volume->name, + (long long)buf->buf_offset, + (long long)buf->raw_offset); bzero(ondisk, HAMMER_BUFSIZE); } } diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index 09ca95e640..8fee63cd8e 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -140,7 +140,7 @@ setip6eui64(const char *cmd, int dummy __unused, int s, if (afp->af_af != AF_INET6) errx(EXIT_FAILURE, "%s not allowed for the AF", cmd); - in6 = (struct in6_addr *)&in6_addreq.ifra_addr.sin6_addr; + in6 = (struct in6_addr *)&in6_addreq.ifra_addr.sin6_addr; if (memcmp(&in6addr_any.s6_addr[8], &in6->s6_addr[8], 8) != 0) errx(EXIT_FAILURE, "interface index is already filled"); if (getifaddrs(&ifap) != 0) @@ -158,7 +158,7 @@ setip6eui64(const char *cmd, int dummy __unused, int s, if (!lladdr) errx(EXIT_FAILURE, "could not determine link local address"); - memcpy(&in6->s6_addr[8], &lladdr->s6_addr[8], 8); + memcpy(&in6->s6_addr[8], &lladdr->s6_addr[8], 8); freeifaddrs(ifap); } diff --git a/test/stress/stress2/testcases/shm/shm.c b/test/stress/stress2/testcases/shm/shm.c index 3c6e1c9b45..1d576cb4b1 100644 --- a/test/stress/stress2/testcases/shm/shm.c +++ b/test/stress/stress2/testcases/shm/shm.c @@ -124,7 +124,7 @@ Sig(int i) { sop[0].sem_op = 1; if (semop(semid, sop, 1) == -1) { if (errno != EINTR && errno != EIDRM && errno != EINVAL) - warn("Sig: semop (%s:%d)", __FILE__, __LINE__); + warn("Sig: semop (%s:%d)", __FILE__, __LINE__); done_testing = 1; } } diff --git a/tools/tools/ath/athprom/athprom.c b/tools/tools/ath/athprom/athprom.c index 7586af6778..7dd3b006e7 100644 --- a/tools/tools/ath/athprom/athprom.c +++ b/tools/tools/ath/athprom/athprom.c @@ -142,8 +142,8 @@ main(int argc, char *argv[]) } else { val = (uint16_t) strtoul(cp+1, NULL, 0); if (val == 0 && errno == EINVAL) - errx(1, "%s: invalid eeprom value %s", - progname, cp+1); + errx(1, "%s: invalid eeprom value %s", + progname, cp+1); oval = eeread(off); printf("Write %04x: %04x = %04x? ", off, oval, val); diff --git a/usr.bin/lex/yylex.c b/usr.bin/lex/yylex.c index 2b5d2472c3..8119c6b6d8 100644 --- a/usr.bin/lex/yylex.c +++ b/usr.bin/lex/yylex.c @@ -28,7 +28,6 @@ /* $Header: /home/daffy/u0/vern/flex/RCS/yylex.c,v 2.13 95/03/04 16:10:41 vern Exp $ */ /* $FreeBSD: src/usr.bin/lex/yylex.c,v 1.5 1999/10/27 07:56:48 obrien Exp $ */ -/* $DragonFly: src/usr.bin/lex/yylex.c,v 1.3 2003/10/04 20:36:47 hmp Exp $ */ #include #include "flexdef.h" @@ -100,7 +99,7 @@ int yylex(void) (void) putc( '\n', stderr ); if ( sectnum == 2 ) - beglin = 1; + beglin = 1; break; diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index 07e973b75a..faf3395451 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -28,7 +28,6 @@ * * @(#)rpc_svcout.c 1.4 90/04/13 SMI; 1.29 89/03/30 (C) 1987 SMI * $FreeBSD: src/usr.bin/rpcgen/rpc_svcout.c,v 1.26 2008/08/12 13:38:06 dfr Exp $ - * $DragonFly: src/usr.bin/rpcgen/rpc_svcout.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ /* @@ -597,7 +596,7 @@ print_return(const char *space) if (timerflag) { if (mtflag) f_print(fout, "%spthread_mutex_lock(&_svcstate_lock);\n", space); - f_print(fout, "%s_rpcsvcstate = _SERVED;\n", space); + f_print(fout, "%s_rpcsvcstate = _SERVED;\n", space); if (mtflag) f_print(fout, "%spthread_mutex_unlock(&_svcstate_lock);\n", space); } diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c index 40a2ef3f95..e4ad7adbea 100644 --- a/usr.bin/systat/netcmds.c +++ b/usr.bin/systat/netcmds.c @@ -32,7 +32,6 @@ * * @(#)netcmds.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/systat/netcmds.c,v 1.9 1999/08/28 01:06:04 peter Exp $ - * $DragonFly: src/usr.bin/systat/netcmds.c,v 1.7 2008/11/10 04:59:45 swildner Exp $ */ /* @@ -227,9 +226,11 @@ checkport(struct inpcb *inp) struct pitem *p; if (ports) - for (p = ports; p < ports+nports; p++) - if (p->port == inp->inp_lport || p->port == inp->inp_fport) - return (p->onoff); + for (p = ports; p < ports+nports; p++) { + if (p->port == inp->inp_lport || + p->port == inp->inp_fport) + return (p->onoff); + } return (1); } @@ -284,10 +285,11 @@ checkhost(struct inpcb *inp) struct hitem *p; if (hosts) - for (p = hosts; p < hosts+nhosts; p++) - if (p->addr.s_addr == inp->inp_laddr.s_addr || - p->addr.s_addr == inp->inp_faddr.s_addr) - return (p->onoff); + for (p = hosts; p < hosts+nhosts; p++) { + if (p->addr.s_addr == inp->inp_laddr.s_addr || + p->addr.s_addr == inp->inp_faddr.s_addr) + return (p->onoff); + } return (1); } diff --git a/usr.sbin/IPXrouted/startup.c b/usr.sbin/IPXrouted/startup.c index 55b73bb24f..a2fcb7dad8 100644 --- a/usr.sbin/IPXrouted/startup.c +++ b/usr.sbin/IPXrouted/startup.c @@ -36,7 +36,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/IPXrouted/startup.c,v 1.8.2.1 2000/07/01 10:46:25 ps Exp $ - * $DragonFly: src/usr.sbin/IPXrouted/startup.c,v 1.4 2004/12/18 22:48:02 swildner Exp $ * * @(#)startup.c 8.1 (Berkeley) 6/5/93 */ @@ -131,7 +130,7 @@ ifinit(void) if ((buf = malloc(needed)) == NULL) quit("malloc"); if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) - lookforinterfaces = 0; + lookforinterfaces = 0; cplim = buf + needed; for (cp = buf; cp < cplim; cp += ifm->ifm_msglen) { ifm = (struct if_msghdr *)cp; diff --git a/usr.sbin/installer/dfuibe_installer/flow.c b/usr.sbin/installer/dfuibe_installer/flow.c index ba4c532c22..2614ef48f4 100644 --- a/usr.sbin/installer/dfuibe_installer/flow.c +++ b/usr.sbin/installer/dfuibe_installer/flow.c @@ -1392,7 +1392,7 @@ state_setup_remote_installation_server(struct i_fn_args *a) dfui_action_property_set(k, "accelerator", "ESC"); if (!dfui_be_present(a->c, f, &r)) - abort_backend(); + abort_backend(); strlcpy(interface, dfui_response_get_action_id(r), 256); diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index 69b98ed382..5b05b14889 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.sbin/rtadvd/rtadvd.c,v 1.3.2.4 2003/04/05 10:31:58 ume Exp $ - * $DragonFly: src/usr.sbin/rtadvd/rtadvd.c,v 1.6 2005/12/05 00:56:37 swildner Exp $ */ #include @@ -1021,7 +1020,7 @@ ra_input(int len, struct nd_router_advert *ra, if (inconsistent) rai->rainconsistent++; - done: +done: free_ndopts(&ndopts); return; } -- 2.41.0