diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-08-08 19:04:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-08-08 19:04:26 +0000 |
commit | 889f3d21fbb021429b724ecdb8320c3eb9cde03f (patch) | |
tree | 46c1cb70beebf52095a1a30b6750b16f677a4aa0 /sbin | |
parent | 8a0c24c71f1196b735373a9d574c7bfb8c7e2ee8 (diff) |
spacing
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/badsect/badsect.c | 24 | ||||
-rw-r--r-- | sbin/disklabel/disklabel.c | 6 | ||||
-rw-r--r-- | sbin/fsirand/fsirand.c | 6 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 24 | ||||
-rw-r--r-- | sbin/lmccontrol/clockgen.c | 6 | ||||
-rw-r--r-- | sbin/mount_portal/pt_tcp.c | 4 | ||||
-rw-r--r-- | sbin/ncheck_ffs/ncheck_ffs.c | 6 | ||||
-rw-r--r-- | sbin/pfctl/pfctl.c | 4 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_optimize.c | 17 | ||||
-rw-r--r-- | sbin/pflogd/pflogd.c | 4 | ||||
-rw-r--r-- | sbin/sysctl/sysctl.c | 20 |
11 files changed, 60 insertions, 61 deletions
diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c index c21a8bedc83..8e6a55cf434 100644 --- a/sbin/badsect/badsect.c +++ b/sbin/badsect/badsect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: badsect.c,v 1.13 2004/03/03 05:03:36 tedu Exp $ */ +/* $OpenBSD: badsect.c,v 1.14 2004/08/08 19:04:25 deraadt Exp $ */ /* $NetBSD: badsect.c,v 1.10 1995/03/18 14:54:28 cgd Exp $ */ /* @@ -40,7 +40,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)badsect.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: badsect.c,v 1.13 2004/03/03 05:03:36 tedu Exp $"; +static const char rcsid[] = "$OpenBSD: badsect.c,v 1.14 2004/08/08 19:04:25 deraadt Exp $"; #endif #endif /* not lint */ @@ -101,19 +101,19 @@ main(int argc, char *argv[]) fprintf(stderr, "usage: badsect bbdir blkno [ blkno ]\n"); exit(1); } - if (chdir(argv[1]) < 0 || stat(".", &stbuf) < 0) + if (chdir(argv[1]) < 0 || stat(".", &stbuf) < 0) err(2, "%s", argv[1]); - + strlcpy(name, _PATH_DEV, sizeof name); len = strlen(name); - if ((dirp = opendir(name)) == NULL) + if ((dirp = opendir(name)) == NULL) err(3, "%s", name); - + while ((dp = readdir(dirp)) != NULL) { strlcpy(&name[len], dp->d_name, sizeof name - len); - if (stat(name, &devstat) < 0) + if (stat(name, &devstat) < 0) err(4, "%s", name); - + if (stbuf.st_dev == devstat.st_rdev && S_ISBLK(devstat.st_mode)) break; @@ -129,13 +129,13 @@ main(int argc, char *argv[]) name[len] = 'r'; strlcpy(&name[len+1], dp->d_name, sizeof name - (len+1)); closedir(dirp); - if (dp == NULL) + if (dp == NULL) err(5, "Cannot find dev 0%o corresponding to %s\n", stbuf.st_rdev, argv[1]); - - if ((fsi = open(name, 0)) < 0) + + if ((fsi = open(name, 0)) < 0) err(6, "%s", name); - + fs = &sblock; rdfs(SBOFF, SBSIZE, (char *)fs); dev_bsize = fs->fs_fsize / fsbtodb(fs, 1); diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index a57cfc4a88d..24ec70ee215 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.89 2004/08/03 09:30:11 otto Exp $ */ +/* $OpenBSD: disklabel.c,v 1.90 2004/08/08 19:04:25 deraadt Exp $ */ /* * Copyright (c) 1987, 1993 @@ -39,7 +39,7 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint -static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.89 2004/08/03 09:30:11 otto Exp $"; +static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.90 2004/08/08 19:04:25 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -1354,7 +1354,7 @@ getasciilabel(FILE *f, struct disklabel *lp) for (i = 0; (cp = tp) && *cp != '\0' && i < NDDATA;) { v = GETNUM(lp->d_drivedata[i], cp, 0, &errstr); - if (errstr) + if (errstr) warnx("line %d: bad drivedata %s", lineno, cp); lp->d_drivedata[i++] = v; diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index 41f7ea67e0f..6b091421a89 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsirand.c,v 1.20 2003/09/24 20:40:19 deraadt Exp $ */ +/* $OpenBSD: fsirand.c,v 1.21 2004/08/08 19:04:25 deraadt Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fsirand.c,v 1.20 2003/09/24 20:40:19 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fsirand.c,v 1.21 2004/08/08 19:04:25 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -180,7 +180,7 @@ fsirand(char *device) ibufsize = sizeof(struct ufs1_dinode) * sblock->fs_ipg; if (oldibufsize < ibufsize) { struct ufs1_dinode *ib; - + if ((ib = realloc(inodebuf, ibufsize)) == NULL) errx(1, "Can't allocate memory for inode buffer"); inodebuf = ib; diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 432175ad598..e6abf1089eb 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.111 2004/08/03 05:36:32 mcbride Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.112 2004/08/08 19:04:25 deraadt Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -77,7 +77,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; #else -static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.111 2004/08/03 05:36:32 mcbride Exp $"; +static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.112 2004/08/08 19:04:25 deraadt Exp $"; #endif #endif /* not lint */ @@ -1261,7 +1261,7 @@ setifpowersavesleep(const char *val, int d) struct ieee80211_power power; const char *errmsg = NULL; int len; - + (void)strlcpy(power.i_name, name, sizeof(power.i_name)); if (ioctl(s, SIOCG80211POWER, (caddr_t)&power) == -1) { warn("SIOCG80211POWER"); @@ -1575,9 +1575,9 @@ unsigned long get_ts_map(int ts_flag, int ts_start, int ts_stop) mask = 1 << (i - 1); map |=mask; } - } else { /* Single channel */ + } else { /* Single channel */ mask = 1 << (ts_stop - 1); - map |= mask; + map |= mask; } return map; } @@ -2287,7 +2287,7 @@ in_getprefix(const char *plen, int which) const char *errmsg = NULL; u_char *cp; int len; - + len = strtonum(plen, 0, 32, &errmsg); if (errmsg) errx(1, "prefix %s: %s", plen, errmsg); @@ -2393,7 +2393,7 @@ in6_getprefix(const char *plen, int which) len = strtonum(plen, 0, 128, &errmsg); if (errmsg) errx(1, "prefix %s: %s", plen, errmsg); - + sin6->sin6_len = sizeof(*sin6); if (which != MASK) sin6->sin6_family = AF_INET6; @@ -2653,7 +2653,7 @@ getifgroups(void) memset(&ifgr, 0, sizeof(ifgr)); strlcpy(ifgr.ifgr_name, name, IFNAMSIZ); - + if (ioctl(s, SIOCGIFGROUP, (caddr_t)&ifgr) == -1) if (errno == EINVAL || errno == ENOTTY) return; @@ -2665,10 +2665,10 @@ getifgroups(void) sizeof(struct ifgroup)); if (ifgr.ifgr_groups == NULL) err(1, "getifgroups"); - + if (ioctl(s, SIOCGIFGROUP, (caddr_t)&ifgr) == -1) err(1, "SIOCGIFGROUP"); - + if (len -= sizeof(struct ifgroup)) { len += sizeof(struct ifgroup); printf("\tgroups: "); @@ -2881,7 +2881,7 @@ setpfsync_syncpeer(const char *val, int d) preq.pfsyncr_syncpeer.s_addr = ((struct sockaddr_in *) peerres->ai_addr)->sin_addr.s_addr; - + if (ioctl(s, SIOCSETPFSYNC, (caddr_t)&ifr) == -1) err(1, "SIOCSETPFSYNC"); } @@ -2909,7 +2909,7 @@ setpfsync_maxupd(const char *val, int d) const char *errmsg = NULL; struct pfsyncreq preq; int maxupdates; - + maxupdates = strtonum(val, 0, 255, &errmsg); if (errmsg) errx(1, "maxupd %s: %s", val, errmsg); diff --git a/sbin/lmccontrol/clockgen.c b/sbin/lmccontrol/clockgen.c index ef2875b8e8e..f52489ae143 100644 --- a/sbin/lmccontrol/clockgen.c +++ b/sbin/lmccontrol/clockgen.c @@ -1,5 +1,5 @@ -/* $OpenBSD: clockgen.c,v 1.2 2002/06/09 08:13:07 todd Exp $ */ -/* $Id: clockgen.c,v 1.2 2002/06/09 08:13:07 todd Exp $ */ +/* $OpenBSD: clockgen.c,v 1.3 2004/08/08 19:04:25 deraadt Exp $ */ +/* $Id: clockgen.c,v 1.3 2004/08/08 19:04:25 deraadt Exp $ */ /*- * Copyright (c) 1997-1999 LAN Media Corporation (LMC) @@ -85,7 +85,7 @@ lmc_av9110_freq(u_int32_t target, lmc_av9110_t *av) f = iFvco / (x * r); if (f >= target) if ((av->f == 0) || (f - target < av->f - target)) { - + av->n = n; av->m = m; if (v == 1) diff --git a/sbin/mount_portal/pt_tcp.c b/sbin/mount_portal/pt_tcp.c index 7a05bdfe091..55d4c8665fb 100644 --- a/sbin/mount_portal/pt_tcp.c +++ b/sbin/mount_portal/pt_tcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pt_tcp.c,v 1.11 2004/05/08 15:23:02 pedro Exp $ */ +/* $OpenBSD: pt_tcp.c,v 1.12 2004/08/08 19:04:25 deraadt Exp $ */ /* * Copyright (c) 2004 Pedro Martelletto <pedro@openbsd.org> @@ -73,7 +73,7 @@ portal_tcp(struct portal_cred *pcr, char *key, char **v, int ks, int *fdp) if (tc > 4) return (EINVAL); - + if (tc > 3) { if (!strcmp(tp[tc - 1], "priv")) { if (pcr->pcr_uid == 0) diff --git a/sbin/ncheck_ffs/ncheck_ffs.c b/sbin/ncheck_ffs/ncheck_ffs.c index aa6cd1b8147..9bf00c74d6e 100644 --- a/sbin/ncheck_ffs/ncheck_ffs.c +++ b/sbin/ncheck_ffs/ncheck_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncheck_ffs.c,v 1.22 2003/11/21 22:57:32 jmc Exp $ */ +/* $OpenBSD: ncheck_ffs.c,v 1.23 2004/08/08 19:04:25 deraadt Exp $ */ /*- * Copyright (c) 1995, 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com> @@ -26,7 +26,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.22 2003/11/21 22:57:32 jmc Exp $"; +static const char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.23 2004/08/08 19:04:25 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -534,7 +534,7 @@ format_entry(const char *path, struct direct *dp) if (size <= dst - buf) { expand_buf: nsize = size << 1; - + if ((newbuf = realloc(buf, nsize)) == NULL) err(1, "realloc"); buf = newbuf; diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 1666a5cda5d..9fb91071c90 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.220 2004/07/23 10:20:42 jmc Exp $ */ +/* $OpenBSD: pfctl.c,v 1.221 2004/08/08 19:04:25 deraadt Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1070,7 +1070,7 @@ _error: } FILE * -pfctl_fopen(const char *name, const char *mode) +pfctl_fopen(const char *name, const char *mode) { struct stat st; FILE *fp; diff --git a/sbin/pfctl/pfctl_optimize.c b/sbin/pfctl/pfctl_optimize.c index c61155b1171..41bd70c845a 100644 --- a/sbin/pfctl/pfctl_optimize.c +++ b/sbin/pfctl/pfctl_optimize.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_optimize.c,v 1.1 2004/07/16 23:44:24 frantzen Exp $ */ +/* $OpenBSD: pfctl_optimize.c,v 1.2 2004/08/08 19:04:25 deraadt Exp $ */ /* * Copyright (c) 2004 Mike Frantzen <frantzen@openbsd.org> @@ -542,7 +542,7 @@ combine_rules(struct pfctl *pf, struct superblock *block) sizeof(p1->por_rule.src.addr)); p1->por_rule.src.addr.type = PF_ADDR_TABLE; strlcpy(p1->por_rule.src.addr.v.tblname, - p1->por_src_tbl->pt_name, + p1->por_src_tbl->pt_name, sizeof(p1->por_rule.src.addr.v.tblname)); pfr_buf_clear(p1->por_src_tbl->pt_buf); @@ -573,7 +573,7 @@ combine_rules(struct pfctl *pf, struct superblock *block) sizeof(p1->por_rule.dst.addr)); p1->por_rule.dst.addr.type = PF_ADDR_TABLE; strlcpy(p1->por_rule.dst.addr.v.tblname, - p1->por_dst_tbl->pt_name, + p1->por_dst_tbl->pt_name, sizeof(p1->por_rule.dst.addr.v.tblname)); pfr_buf_clear(p1->por_dst_tbl->pt_buf); @@ -988,7 +988,6 @@ remove_from_skipsteps(struct skiplist *head, struct superblock *block, next = TAILQ_NEXT(sk, ps_entry); assert(next == NULL || next->ps_count <= sk->ps_count); #endif /* OPT_DEBUG */ - } } } @@ -1324,7 +1323,7 @@ addrs_combineable(struct pf_rule_addr *a, struct pf_rule_addr *b) return (0); if (a->neg != b->neg || a->port_op != b->port_op || a->port[0] != b->port[0] || a->port[1] != b->port[1]) - return (0); + return (0); return (1); } @@ -1397,13 +1396,13 @@ superblock_inclusive(struct superblock *block, struct pf_opt_rule *por) if (closest >= 0) DEBUG("superblock break @ %d on %s+%xh", - por->por_rule.nr, + por->por_rule.nr, pf_rule_desc[closest].prf_name, i - pf_rule_desc[closest].prf_offset - pf_rule_desc[closest].prf_size); else DEBUG("superblock break @ %d on field @ %d", - por->por_rule.nr, i); + por->por_rule.nr, i); return (0); } } @@ -1475,7 +1474,7 @@ exclude_supersets(struct pf_rule *super, struct pf_rule *sub) super->src.addr.v.a.mask.addr32[3] == 0) memset(&sub->src.addr, 0, sizeof(sub->src.addr)); else if (super->src.addr.type == PF_ADDR_ADDRMASK && - sub->src.addr.type == PF_ADDR_ADDRMASK && + sub->src.addr.type == PF_ADDR_ADDRMASK && super->src.neg == sub->src.neg && super->af == sub->af && unmask(&super->src.addr.v.a.mask, super->af) < @@ -1503,7 +1502,7 @@ exclude_supersets(struct pf_rule *super, struct pf_rule *sub) super->dst.addr.v.a.mask.addr32[3] == 0) memset(&sub->dst.addr, 0, sizeof(sub->dst.addr)); else if (super->dst.addr.type == PF_ADDR_ADDRMASK && - sub->dst.addr.type == PF_ADDR_ADDRMASK && + sub->dst.addr.type == PF_ADDR_ADDRMASK && super->dst.neg == sub->dst.neg && super->af == sub->af && unmask(&super->dst.addr.v.a.mask, super->af) < diff --git a/sbin/pflogd/pflogd.c b/sbin/pflogd/pflogd.c index 9973b6ce87f..5d5ec25dbcb 100644 --- a/sbin/pflogd/pflogd.c +++ b/sbin/pflogd/pflogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pflogd.c,v 1.29 2004/05/23 19:00:26 deraadt Exp $ */ +/* $OpenBSD: pflogd.c,v 1.30 2004/08/08 19:04:25 deraadt Exp $ */ /* * Copyright (c) 2001 Theo de Raadt @@ -489,7 +489,7 @@ dump_packet(u_char *user, const struct pcap_pkthdr *h, const u_char *sp) return; } - append: + append: memcpy(bufpos, h, sizeof(*h)); memcpy(bufpos + sizeof(*h), sp, h->caplen); diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index dd176c9a41d..c17755fc72e 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.114 2004/07/28 17:15:12 tholo Exp $ */ +/* $OpenBSD: sysctl.c,v 1.115 2004/08/08 19:04:25 deraadt Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -40,7 +40,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)sysctl.c 8.5 (Berkeley) 5/9/95"; #else -static const char rcsid[] = "$OpenBSD: sysctl.c,v 1.114 2004/07/28 17:15:12 tholo Exp $"; +static const char rcsid[] = "$OpenBSD: sysctl.c,v 1.115 2004/08/08 19:04:25 deraadt Exp $"; #endif #endif /* not lint */ @@ -520,9 +520,9 @@ parse(char *string, int flags) return; if ((mib[2] == IPPROTO_TCP && - mib[3] == TCPCTL_BADDYNAMIC) || + mib[3] == TCPCTL_BADDYNAMIC) || (mib[2] == IPPROTO_UDP && - mib[3] == UDPCTL_BADDYNAMIC)) { + mib[3] == UDPCTL_BADDYNAMIC)) { special |= BADDYNAMIC; @@ -788,9 +788,9 @@ parse(char *string, int flags) if (!nflag) (void)printf("%s%s", string, equ); (void)printf("bootdev = 0x%x, " - "cylinders = %u, heads = %u, sectors = %u\n", - pdi->bsd_dev, pdi->bios_cylinders, - pdi->bios_heads, pdi->bios_sectors); + "cylinders = %u, heads = %u, sectors = %u\n", + pdi->bsd_dev, pdi->bios_cylinders, + pdi->bios_heads, pdi->bios_sectors); return; } if (special & BIOSDEV) { @@ -1654,9 +1654,9 @@ sysctl_malloc(char *string, char **bufpp, int mib[], int flags, int *typep) ptr = strstr(buf, name); tryagain: if (ptr == NULL) { - warnx("fourth level name %s in %s is invalid", name, - string); - return (-1); + warnx("fourth level name %s in %s is invalid", name, + string); + return (-1); } if ((*(ptr + strlen(name)) != ',') && (*(ptr + strlen(name)) != '\0')) { |