diff options
-rw-r--r-- | usr.sbin/ac/ac.c | 20 | ||||
-rw-r--r-- | usr.sbin/arp/arp.c | 48 | ||||
-rw-r--r-- | usr.sbin/eeprom/eehandlers.c | 8 | ||||
-rw-r--r-- | usr.sbin/inetd/inetd.c | 56 | ||||
-rw-r--r-- | usr.sbin/iostat/iostat.c | 10 | ||||
-rw-r--r-- | usr.sbin/kvm_mkdb/nlist.c | 9 | ||||
-rw-r--r-- | usr.sbin/memconfig/memconfig.c | 86 | ||||
-rw-r--r-- | usr.sbin/portmap/portmap.c | 24 | ||||
-rw-r--r-- | usr.sbin/pstat/pstat.c | 36 | ||||
-rw-r--r-- | usr.sbin/quot/quot.c | 44 | ||||
-rw-r--r-- | usr.sbin/rwhod/rwhod.c | 4 | ||||
-rw-r--r-- | usr.sbin/spray/spray.c | 17 | ||||
-rw-r--r-- | usr.sbin/tokenadm/tokenadm.c | 7 | ||||
-rw-r--r-- | usr.sbin/usbdevs/usbdevs.c | 5 | ||||
-rw-r--r-- | usr.sbin/vipw/vipw.c | 2 | ||||
-rw-r--r-- | usr.sbin/wsmoused/wsmoused.c | 20 | ||||
-rw-r--r-- | usr.sbin/ypbind/ypbind.c | 8 | ||||
-rw-r--r-- | usr.sbin/yppoll/yppoll.c | 6 | ||||
-rw-r--r-- | usr.sbin/ypset/ypset.c | 8 |
19 files changed, 209 insertions, 209 deletions
diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c index ecc8e1dc44b..cae5625f1d0 100644 --- a/usr.sbin/ac/ac.c +++ b/usr.sbin/ac/ac.c @@ -14,7 +14,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ac.c,v 1.11 2002/02/17 19:42:35 millert Exp $"; +static char rcsid[] = "$Id: ac.c,v 1.12 2002/05/30 19:09:05 deraadt Exp $"; #endif #include <sys/types.h> @@ -122,7 +122,7 @@ add_tty(name) register char *rcp; Flags |= AC_T; - + if ((tp = NEW(struct tty_list)) == NULL) err(1, "malloc"); tp->len = 0; /* full match */ @@ -150,7 +150,7 @@ do_tty(name) { struct tty_list *tp; int def_ret = 0; - + for (tp = Ttys; tp != NULL; tp = tp->next) { if (tp->ret == 0) /* specific don't */ def_ret = 1; /* default do */ @@ -207,7 +207,7 @@ update_user(head, name, secs) */ if (Flags & AC_U) return head; - + if ((up = NEW(struct user_list)) == NULL) err(1, "malloc"); up->next = head; @@ -275,11 +275,11 @@ main(argc, argv) */ if (access(_PATH_WTMP, 0) != 0 && errno == ENOENT) return 0; - + fp = file(_PATH_WTMP); } ac(fp); - + return 0; } @@ -324,7 +324,7 @@ show_today(users, logins, secs) /* restore the missing second */ yesterday++; - + for (lp = logins; lp != NULL; lp = lp->next) { secs = yesterday - lp->usr.ut_time; Users = update_user(Users, lp->usr.ut_name, secs); @@ -351,7 +351,7 @@ log_out(head, up) { struct utmp_list *lp, *lp2, *tlp; time_t secs; - + for (lp = head, lp2 = NULL; lp != NULL; ) if (*up->ut_line == '~' || strncmp(lp->usr.ut_line, up->ut_line, sizeof (up->ut_line)) == 0) { @@ -461,7 +461,7 @@ ac(fp) struct tm *ltm; time_t secs = 0; int day = -1; - + while (fread((char *)&usr, sizeof(usr), 1, fp) == 1) { if (!FirstTime) FirstTime = usr.ut_time; @@ -515,7 +515,7 @@ ac(fp) if (!(Flags & AC_W)) usr.ut_time = time((time_t *)0); (void)strcpy(usr.ut_line, "~"); - + if (Flags & AC_D) { ltm = localtime(&usr.ut_time); if (day >= 0 && day != ltm->tm_yday) { diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 4c6e19a4119..1fd33c2f8d0 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arp.c,v 1.22 2002/05/26 09:25:21 deraadt Exp $ */ +/* $OpenBSD: arp.c,v 1.23 2002/05/30 19:09:05 deraadt Exp $ */ /* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */ /* @@ -45,7 +45,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)arp.c 8.2 (Berkeley) 1/2/94";*/ -static char *rcsid = "$OpenBSD: arp.c,v 1.22 2002/05/26 09:25:21 deraadt Exp $"; +static char *rcsid = "$OpenBSD: arp.c,v 1.23 2002/05/30 19:09:05 deraadt Exp $"; #endif /* not lint */ /* @@ -112,7 +112,7 @@ main(argc, argv) pid = getpid(); opterr = 0; func = 0; - + while ((ch = getopt(argc, argv, "andsf")) != -1) { switch ((char)ch) { case 'a': @@ -147,7 +147,7 @@ main(argc, argv) if (!func) func = F_GET; rtn = 0; - + switch (func) { case F_GET: if (aflag && argc == 0) @@ -233,7 +233,7 @@ struct { } m_rtmsg; /* - * Set an individual arp entry + * Set an individual arp entry */ int set(argc, argv) @@ -260,7 +260,7 @@ set(argc, argv) return (1); ea = ether_aton(eaddr); if (ea == NULL) - errx(1, "invalid ethernet address: %s", eaddr); + errx(1, "invalid ethernet address: %s", eaddr); memcpy(LLADDR(&sdl_m), ea, sizeof(*ea)); sdl_m.sdl_alen = 6; doing_proxy = flags = export_only = expire_time = 0; @@ -270,7 +270,7 @@ set(argc, argv) (void)gettimeofday(&time, 0); expire_time = time.tv_sec + 20 * 60; if (flags & RTF_PERMANENT_ARP) { - /* temp or permanent, not both */ + /* temp or permanent, not both */ usage(); return (0); } @@ -278,11 +278,11 @@ set(argc, argv) else if (strncmp(argv[0], "pub", 3) == 0) { flags |= RTF_ANNOUNCE; doing_proxy = SIN_PROXY; - } + } else if (strncmp(argv[0], "permanent", 9) == 0) { flags |= RTF_PERMANENT_ARP; if (expire_time != 0) { - /* temp or permanent, not both */ + /* temp or permanent, not both */ usage(); return (0); } @@ -303,10 +303,12 @@ tryagain: if (sin->sin_addr.s_addr == sin_m.sin_addr.s_addr) { if (sdl->sdl_family == AF_LINK && (rtm->rtm_flags & RTF_LLINFO) && - !(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) { - case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023: - case IFT_ISO88024: case IFT_ISO88025: - goto overwrite; + !(rtm->rtm_flags & RTF_GATEWAY)) { + switch (sdl->sdl_type) { + case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023: + case IFT_ISO88024: case IFT_ISO88025: + goto overwrite; + } } if (doing_proxy == 0) { (void)printf("set: can only proxy for %s\n", host); @@ -355,7 +357,7 @@ get(host) } /* - * Delete an arp entry + * Delete an arp entry */ int delete(host, info) @@ -385,10 +387,12 @@ tryagain: if (sin->sin_addr.s_addr == sin_m.sin_addr.s_addr) { if (sdl->sdl_family == AF_LINK && (rtm->rtm_flags & RTF_LLINFO) && - !(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) { - case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023: - case IFT_ISO88024: case IFT_ISO88025: - goto delete; + !(rtm->rtm_flags & RTF_GATEWAY)) { + switch (sdl->sdl_type) { + case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023: + case IFT_ISO88024: case IFT_ISO88025: + goto delete; + } } } if (sin_m.sin_other & SIN_PROXY) { @@ -403,7 +407,7 @@ delete: (void)printf("cannot locate %s\n", host); return (1); } - if (rtmsg(RTM_DELETE)) + if (rtmsg(RTM_DELETE)) return (1); (void)printf("%s (%s) deleted\n", host, inet_ntoa(sin->sin_addr)); return (0); @@ -467,7 +471,7 @@ print_entry(sdl, sin, rtm) char *host; extern int h_errno; struct hostent *hp; - + if (nflag == 0) hp = gethostbyaddr((caddr_t)&(sin->sin_addr), sizeof(sin->sin_addr), AF_INET); @@ -498,7 +502,7 @@ print_entry(sdl, sin, rtm) (void)printf(" published"); if (sin->sin_len != 8) (void)printf("(weird)"); - } + } printf("\n"); } @@ -512,7 +516,7 @@ nuke_entry(sdl, sin, rtm) struct rt_msghdr *rtm; { char ip[20]; - + strlcpy(ip, inet_ntoa(sin->sin_addr), sizeof(ip)); delete(ip, NULL); } diff --git a/usr.sbin/eeprom/eehandlers.c b/usr.sbin/eeprom/eehandlers.c index 8a19402ec0d..00b2f06c0cf 100644 --- a/usr.sbin/eeprom/eehandlers.c +++ b/usr.sbin/eeprom/eehandlers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eehandlers.c,v 1.9 2002/05/29 09:48:14 deraadt Exp $ */ +/* $OpenBSD: eehandlers.c,v 1.10 2002/05/30 19:09:05 deraadt Exp $ */ /* $NetBSD: eehandlers.c,v 1.2 1996/02/28 01:13:22 thorpej Exp $ */ /*- @@ -202,7 +202,7 @@ ee_screensize(ktent, arg) break; if (svp->sv_str == NULL) BARF(ktent); - + scsize = svp->sv_val; if (doio(ktent, &scsize, sizeof(scsize), IO_WRITE)) FAILEDWRITE(ktent); @@ -403,7 +403,7 @@ ee_constype(ktent, arg) } } printf("%s=%s\n", ktent->kt_keyword, svp->sv_str); - + } #endif @@ -614,7 +614,7 @@ ee_verifychecksums() kt.kt_keyword = "eeprom writecount"; kt.kt_offset = EE_WC_LOC; kt.kt_handler = ee_notsupp; - + if (doio(&kt, (u_char *)&owritecount, sizeof(owritecount), IO_READ)) { cksumfail = 1; FAILEDREAD(&kt); diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index ebd66e22fef..3fb3d306f2f 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inetd.c,v 1.92 2002/05/29 19:23:34 deraadt Exp $ */ +/* $OpenBSD: inetd.c,v 1.93 2002/05/30 19:09:05 deraadt Exp $ */ /* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */ /* * Copyright (c) 1983,1991 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/ -static char rcsid[] = "$OpenBSD: inetd.c,v 1.92 2002/05/29 19:23:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: inetd.c,v 1.93 2002/05/30 19:09:05 deraadt Exp $"; #endif /* not lint */ /* @@ -61,7 +61,7 @@ static char rcsid[] = "$OpenBSD: inetd.c,v 1.92 2002/05/29 19:23:34 deraadt Exp * to receive further messages on, or ``take over the socket'', * processing all arriving datagrams and, eventually, timing * out. The first type of server is said to be ``multi-threaded''; - * the second type of server ``single-threaded''. + * the second type of server ``single-threaded''. * * Inetd uses a configuration file which is read at startup * and, possibly, at some later time in response to a hangup signal. @@ -117,23 +117,23 @@ static char rcsid[] = "$OpenBSD: inetd.c,v 1.92 2002/05/29 19:23:34 deraadt Exp * Here's the scoop concerning the user[.:]group feature: * * 1) set-group-option off. - * - * a) user = root: NO setuid() or setgid() is done - * - * b) other: setgid(primary group as found in passwd) - * initgroups(name, primary group) - * setuid() + * + * a) user = root: NO setuid() or setgid() is done + * + * b) other: setgid(primary group as found in passwd) + * initgroups(name, primary group) + * setuid() * * 2) set-group-option on. - * - * a) user = root: setgid(specified group) - * NO initgroups() - * NO setuid() * - * b) other: setgid(specified group) - * initgroups(name, specified group) - * setuid() - * + * a) user = root: setgid(specified group) + * NO initgroups() + * NO setuid() + * + * b) other: setgid(specified group) + * initgroups(name, specified group) + * setuid() + * */ #include <sys/param.h> @@ -421,7 +421,7 @@ main(argc, argv, envp) sigaddset(&blockmask, SIGALRM); memset((char *)&sa, 0, sizeof(sa)); - sigemptyset(&sa.sa_mask); + sigemptyset(&sa.sa_mask); sigaddset(&sa.sa_mask, SIGALRM); sigaddset(&sa.sa_mask, SIGCHLD); sigaddset(&sa.sa_mask, SIGHUP); @@ -462,7 +462,7 @@ main(argc, argv, envp) } (void) sigprocmask(SIG_SETMASK, &emptymask, NULL); } - + if (wantretry || wantconfig || wantreap || wantdie) { if (wantretry) { doretry(); @@ -812,10 +812,10 @@ doconfig(void) /* * sep->se_wait may be holding the pid of a daemon * that we're waiting for. If so, don't overwrite - * it unless the config file explicitly says don't + * it unless the config file explicitly says don't * wait. */ - if (cp->se_bi == 0 && + if (cp->se_bi == 0 && (sep->se_wait == 1 || cp->se_wait == 0)) sep->se_wait = cp->se_wait; SWAP(int, cp->se_max, sep->se_max); @@ -843,7 +843,7 @@ doconfig(void) break; (void)unlink(sep->se_service); n = strlen(sep->se_service); - if (n > sizeof sep->se_ctrladdr_un.sun_path - 1) + if (n > sizeof sep->se_ctrladdr_un.sun_path - 1) n = sizeof sep->se_ctrladdr_un.sun_path - 1; strncpy(sep->se_ctrladdr_un.sun_path, sep->se_service, n); @@ -1306,14 +1306,14 @@ getconfigent() memset(sep, 0, sizeof *sep); more: freeconfig(sep); - + while ((cp = nextline(fconfig)) && *cp == '#') ; if (cp == NULL) { free(sep); return (NULL); } - + memset((char *)sep, 0, sizeof *sep); arg = skip(&cp, 0); if (arg == NULL) { @@ -1365,7 +1365,7 @@ more: if ((arg = skip(&cp, 1)) == NULL) goto more; - + sep->se_proto = newstr(arg); if (strcmp(sep->se_proto, "unix") == 0) { @@ -1395,7 +1395,7 @@ more: sep->se_rpcversl = sep->se_rpcversh = l; if (*ccp == '-') { cp = ccp + 1; - l = strtol(cp, &ccp, 0); + l = strtol(cp, &ccp, 0); if (ccp == cp || l < 0 || l > INT_MAX || l < sep->se_rpcversl || *ccp) goto badafterall; @@ -1435,7 +1435,7 @@ more: } if ((arg = skip(&cp, 1)) == NULL) goto more; - + sep->se_server = newstr(arg); if (strcmp(sep->se_server, "internal") == 0) { struct biltin *bi; @@ -1621,7 +1621,7 @@ erp: syslog(LOG_ERR, "syntax error in inetd config file"); return (NULL); } - + again: while (*cp == ' ' || *cp == '\t') cp++; diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index a4f227448b9..3f44941e35c 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iostat.c,v 1.13 2002/03/14 16:44:25 mpech Exp $ */ +/* $OpenBSD: iostat.c,v 1.14 2002/05/30 19:09:05 deraadt Exp $ */ /* $NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $ */ /* @@ -96,7 +96,7 @@ static char *rcsid = "$NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $" /* Defined in dkstats.c */ extern struct _disk cur; -extern int dk_ndrive; +extern int dk_ndrive; /* Namelist and memory files. */ char *nlistf, *memf; @@ -272,7 +272,7 @@ double etime; mbps = (cur.dk_bytes[dn] / (1024.0)) / cur.dk_xfer[dn]; else mbps = 0.0; - (void)printf(" %5.2f", mbps); + (void)printf(" %5.2f", mbps); /* average transfers per second. */ (void)printf(" %3.0f", cur.dk_xfer[dn] / etime); @@ -284,7 +284,7 @@ double etime; /* Megabytes per second. */ if (atime != 0.0) mbps = cur.dk_bytes[dn] / (double)(1024 * 1024); - else + else mbps = 0; (void)printf(" %4.2f ", mbps / etime); } @@ -362,7 +362,7 @@ display() if (ISSET(todo, SHOW_TTY)) printf("%4.0f %4.0f", cur.tk_nin / etime, cur.tk_nout / etime); - + if (ISSET(todo, SHOW_STATS_1)) disk_stats(etime); diff --git a/usr.sbin/kvm_mkdb/nlist.c b/usr.sbin/kvm_mkdb/nlist.c index 901529153bf..7841e8a8992 100644 --- a/usr.sbin/kvm_mkdb/nlist.c +++ b/usr.sbin/kvm_mkdb/nlist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nlist.c,v 1.26 2002/03/25 16:41:43 deraadt Exp $ */ +/* $OpenBSD: nlist.c,v 1.27 2002/05/30 19:09:05 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93"; #else -static char *rcsid = "$OpenBSD: nlist.c,v 1.26 2002/03/25 16:41:43 deraadt Exp $"; +static char *rcsid = "$OpenBSD: nlist.c,v 1.27 2002/05/30 19:09:05 deraadt Exp $"; #endif #endif /* not lint */ @@ -147,7 +147,7 @@ __aout_knlist(fd, db, ksyms) warn("fseek %s", kfile); return (-1); } - + data.data = (u_char *)&nbuf; data.size = sizeof(NLIST); @@ -361,7 +361,7 @@ __elf_knlist(fd, db, ksyms) } } - + /* Check for files too large to mmap. */ /* XXX is this really possible? */ if (symstrsize > SIZE_T_MAX) { @@ -641,7 +641,6 @@ __ecoff_knlist(fd, db, ksyms) data.data = (u_char *)&nbuf; data.size = sizeof(nbuf); } - } unmap: diff --git a/usr.sbin/memconfig/memconfig.c b/usr.sbin/memconfig/memconfig.c index e73847f86d0..b58da845765 100644 --- a/usr.sbin/memconfig/memconfig.c +++ b/usr.sbin/memconfig/memconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memconfig.c,v 1.4 2002/02/16 21:28:04 millert Exp $ */ +/* $OpenBSD: memconfig.c,v 1.5 2002/05/30 19:09:05 deraadt Exp $ */ /*- * Copyright (c) 1999 Michael Smith <msmith@freebsd.org> * All rights reserved. @@ -64,18 +64,18 @@ static void clearfunc(int, int, char *[]); static void helpfunc(int, int, char *[]); static void help(char *); -struct +struct { char *cmd; char *desc; void (*func)(int, int, char *[]); } functions[] = { - {"list", + {"list", "List current memory range attributes\n" " list [-a]\n" " -a list all range slots, even those that are inactive", listfunc}, - {"set", + {"set", "Set memory range attributes\n" " set -b <base> -l <length> -o <owner> <attribute>\n" " <base> memory range base address\n" @@ -88,7 +88,7 @@ struct " write-back\n" " write-protect", setfunc}, - {"clear", + {"clear", "Clear memory range attributes\n" " clear -o <owner>\n" " <owner> all ranges with this owner will be cleared\n" @@ -102,8 +102,8 @@ struct int main(argc, argv) - int argc; - char *argv[]; + int argc; + char *argv[]; { int i, memfd; @@ -112,7 +112,7 @@ main(argc, argv) } else { if ((memfd = open("/dev/mem", O_RDONLY)) == -1) err(1, "can't open /dev/mem"); - + for (i = 0; functions[i].cmd != NULL; i++) if (!strcmp(argv[1], functions[i].cmd)) break; @@ -124,8 +124,8 @@ main(argc, argv) static struct mem_range_desc * mrgetall(memfd, nmr) - int memfd; - int *nmr; + int memfd; + int *nmr; { struct mem_range_desc *mrd; struct mem_range_op mro; @@ -133,27 +133,27 @@ mrgetall(memfd, nmr) mro.mo_arg[0] = 0; if (ioctl(memfd, MEMRANGE_GET, &mro)) err(1, "can't size range descriptor array"); - + *nmr = mro.mo_arg[0]; mrd = malloc(*nmr * sizeof(struct mem_range_desc)); if (mrd == NULL) - errx(1, "can't allocate %d bytes for %d range descriptors", + errx(1, "can't allocate %d bytes for %d range descriptors", *nmr * sizeof(struct mem_range_desc), *nmr); - + mro.mo_arg[0] = *nmr; mro.mo_desc = mrd; if (ioctl(memfd, MEMRANGE_GET, &mro)) err(1, "can't fetch range descriptor array"); - + return(mrd); } static void listfunc(memfd, argc, argv) - int memfd; - int argc; - char *argv[]; + int memfd; + int argc; + char *argv[]; { struct mem_range_desc *mrd; int nd, i, j; @@ -174,15 +174,15 @@ listfunc(memfd, argc, argv) default: help("list"); } - + mrd = mrgetall(memfd, &nd); - + for (i = 0; i < nd; i++) { if (!showall && !(mrd[i].mr_flags & MDF_ACTIVE)) continue; if (owner && strcmp(mrd[i].mr_owner, owner)) continue; - printf("%qx/%qx %.8s ", mrd[i].mr_base, mrd[i].mr_len, + printf("%qx/%qx %.8s ", mrd[i].mr_base, mrd[i].mr_len, mrd[i].mr_owner[0] ? mrd[i].mr_owner : "-"); for (j = 0; attrnames[j].name != NULL; j++) if (mrd[i].mr_flags & attrnames[j].val) @@ -196,9 +196,9 @@ listfunc(memfd, argc, argv) static void setfunc(memfd, argc, argv) - int memfd; - int argc; - char *argv[]; + int memfd; + int argc; + char *argv[]; { struct mem_range_desc mrd; struct mem_range_op mro; @@ -228,18 +228,18 @@ setfunc(memfd, argc, argv) help("set"); strcpy(mrd.mr_owner, optarg); break; - + case '?': default: help("set"); } - + if (mrd.mr_len == 0) help("set"); - + argc -= optind; argv += optind; - + while(argc--) { for (i = 0; attrnames[i].name != NULL; i++) { if (!strcmp(attrnames[i].name, argv[0])) { @@ -253,7 +253,7 @@ setfunc(memfd, argc, argv) help("flags"); argv++; } - + mro.mo_desc = &mrd; mro.mo_arg[0] = 0; if (ioctl(memfd, MEMRANGE_SET, &mro)) @@ -262,16 +262,16 @@ setfunc(memfd, argc, argv) static void clearfunc(memfd, argc, argv) - int memfd; - int argc; - char *argv[]; + int memfd; + int argc; + char *argv[]; { struct mem_range_desc mrd, *mrdp; struct mem_range_op mro; int i, nd; int ch; char *ep, *owner; - + mrd.mr_base = 0; mrd.mr_len = 0; owner = NULL; @@ -292,24 +292,24 @@ clearfunc(memfd, argc, argv) help("clear"); owner = strdup(optarg); break; - + case '?': default: help("clear"); } - + if (owner != NULL) { /* clear-by-owner */ if ((mrd.mr_base != 0) || (mrd.mr_len != 0)) help("clear"); - + mrdp = mrgetall(memfd, &nd); mro.mo_arg[0] = MEMRANGE_SET_REMOVE; for (i = 0; i < nd; i++) { - if (!strcmp(owner, mrdp[i].mr_owner) && + if (!strcmp(owner, mrdp[i].mr_owner) && (mrdp[i].mr_flags & MDF_ACTIVE) && !(mrdp[i].mr_flags & MDF_FIXACTIVE)) { - + mro.mo_desc = mrdp + i; if (ioctl(memfd, MEMRANGE_SET, &mro)) warn("couldn't clear range owned by '%s'", owner); @@ -328,19 +328,19 @@ clearfunc(memfd, argc, argv) static void helpfunc(memfd, argc, argv) - int memfd; - int argc; - char *argv[]; + int memfd; + int argc; + char *argv[]; { help(argv[1]); } static void help(what) - char *what; + char *what; { int i; - + if (what != NULL) { /* find a function that matches */ for (i = 0; functions[i].cmd != NULL; i++) @@ -350,7 +350,7 @@ help(what) } fprintf(stderr, "Unknown command '%s'\n", what); } - + /* print general help */ fprintf(stderr, "Valid commands are :\n"); for (i = 0; functions[i].cmd != NULL; i++) diff --git a/usr.sbin/portmap/portmap.c b/usr.sbin/portmap/portmap.c index 328e5f72ec3..acc5985f86d 100644 --- a/usr.sbin/portmap/portmap.c +++ b/usr.sbin/portmap/portmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: portmap.c,v 1.21 2002/03/14 16:44:25 mpech Exp $ */ +/* $OpenBSD: portmap.c,v 1.22 2002/05/30 19:09:05 deraadt Exp $ */ /*- * Copyright (c) 1996, 1997 Theo de Raadt (OpenBSD). All rights reserved. @@ -44,7 +44,7 @@ char copyright[] = #if 0 static char sccsid[] = "from: @(#)portmap.c 5.4 (Berkeley) 4/19/91"; #else -static char rcsid[] = "$OpenBSD: portmap.c,v 1.21 2002/03/14 16:44:25 mpech Exp $"; +static char rcsid[] = "$OpenBSD: portmap.c,v 1.22 2002/05/30 19:09:05 deraadt Exp $"; #endif #endif /* not lint */ @@ -65,23 +65,23 @@ static char sccsid[] = "@(#)portmap.c 1.32 87/08/06 Copyr 1984 Sun Micro"; * may copy or modify Sun RPC without charge, but are not authorized * to license or distribute it to anyone else except as part of a product or * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * + * * Sun RPC is provided with no support and without any obligation on the * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -274,7 +274,7 @@ find_service(prog, vers, prot) return (hit); } -/* +/* * 1 OK, 0 not */ void @@ -287,7 +287,7 @@ reg_service(rqstp, xprt) struct sockaddr_in *fromsin; long ans = 0, port; caddr_t t; - + fromsin = svc_getcaller(xprt); if (debugging) @@ -350,7 +350,7 @@ reg_service(rqstp, xprt) goto done; } - /* + /* * add to END of list */ pml = (struct pmaplist *)malloc(sizeof(struct pmaplist)); @@ -460,7 +460,7 @@ reg_service(rqstp, xprt) * Calls a procedure on the local machine. If the requested * procedure is not registered this procedure does not return * error information!! - * This procedure is only supported on rpc/udp and calls via + * This procedure is only supported on rpc/udp and calls via * rpc/udp. It passes null authentication parameters. */ callit(rqstp, xprt); @@ -572,7 +572,7 @@ xdr_len_opaque_parms(xdrs, cap) * a machine should shut-up instead of complain, less the requestor be * overrun with complaints at the expense of not hearing a valid reply ... * - * This now forks so that the program & process that it calls can call + * This now forks so that the program & process that it calls can call * back to the portmapper. */ void diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index ce2c59a8a77..3873733b48d 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pstat.c,v 1.30 2002/03/14 16:44:25 mpech Exp $ */ +/* $OpenBSD: pstat.c,v 1.31 2002/05/30 19:09:05 deraadt Exp $ */ /* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94"; #else -static char *rcsid = "$OpenBSD: pstat.c,v 1.30 2002/03/14 16:44:25 mpech Exp $"; +static char *rcsid = "$OpenBSD: pstat.c,v 1.31 2002/05/30 19:09:05 deraadt Exp $"; #endif #endif /* not lint */ @@ -295,7 +295,7 @@ vnode_print(avnode, vp) struct vnode *avnode; struct vnode *vp; { - char *type, flags[16]; + char *type, flags[16]; char *fp = flags; int flag; @@ -321,7 +321,7 @@ vnode_print(avnode, vp) type = "fif"; break; case VBAD: type = "bad"; break; - default: + default: type = "unk"; break; } /* @@ -358,13 +358,13 @@ vnode_print(avnode, vp) } void -ufs_header() +ufs_header() { (void)printf(" FILEID IFLAG RDEV|SZ"); } int -ufs_print(vp) +ufs_print(vp) struct vnode *vp; { int flag; @@ -406,7 +406,7 @@ ufs_print(vp) if (S_ISCHR(ip->i_ffs_mode) || S_ISBLK(ip->i_ffs_mode)) if (usenumflag || ((name = devname(ip->i_ffs_rdev, type)) == NULL)) - (void)printf(" %2d,%-2d", + (void)printf(" %2d,%-2d", major(ip->i_ffs_rdev), minor(ip->i_ffs_rdev)); else (void)printf(" %7s", name); @@ -416,13 +416,13 @@ ufs_print(vp) } void -ext2fs_header() +ext2fs_header() { (void)printf(" FILEID IFLAG SZ"); } int -ext2fs_print(vp) +ext2fs_print(vp) struct vnode *vp; { int flag; @@ -462,13 +462,13 @@ ext2fs_print(vp) } void -nfs_header() +nfs_header() { (void)printf(" FILEID NFLAG RDEV|SZ"); } int -nfs_print(vp) +nfs_print(vp) struct vnode *vp; { struct nfsnode nfsnode, *np = &nfsnode; @@ -502,7 +502,7 @@ nfs_print(vp) type = VT.va_mode & S_IFMT; if (S_ISCHR(VT.va_mode) || S_ISBLK(VT.va_mode)) if (usenumflag || ((name = devname(VT.va_rdev, type)) == NULL)) - (void)printf(" %2d,%-2d", + (void)printf(" %2d,%-2d", major(VT.va_rdev), minor(VT.va_rdev)); else (void)printf(" %7s", name); @@ -510,7 +510,7 @@ nfs_print(vp) (void)printf(" %7qd", np->n_size); return (0); } - + /* * Given a pointer to a mount structure in kernel space, * read it in and return a usable pointer to it. @@ -768,7 +768,7 @@ kinfo_vnodes(avnodes) *avnodes = num; return ((struct e_vnode *)vbuf); } - + char hdr[]=" LINE RAW CAN OUT HWT LWT COL STATE SESS PGID DISC\n"; void @@ -824,7 +824,7 @@ ttyprt(tp) else (void)printf("%7s ", name); (void)printf("%3d %4d ", tp->t_rawq.c_cc, tp->t_canq.c_cc); - (void)printf("%4d %4d %3d %6d ", tp->t_outq.c_cc, + (void)printf("%4d %4d %3d %6d ", tp->t_outq.c_cc, tp->t_hiwat, tp->t_lowat, tp->t_column); for (i = j = 0; ttystates[i].flag; i++) if (tp->t_state&ttystates[i].flag) @@ -884,7 +884,7 @@ filemode() addr = ((struct filelist *)buf)->lh_first; ffp = (struct file *)(buf + sizeof(struct filelist)); nfile = (len - sizeof(struct filelist)) / sizeof(struct file); - + (void)printf("%d/%d open files\n", nfile, maxfile); (void)printf("%*s TYPE FLG CNT MSG %*s OFFSET\n", @@ -1023,13 +1023,13 @@ swapmode() avail += xsize; if (totalflag) continue; - (void)printf("%8d %8d %5.0f%% %d\n", + (void)printf("%8d %8d %5.0f%% %d\n", used / div, xfree / div, (double)used / (double)xsize * 100.0, swdev[i].se_priority); } - /* + /* * If only one partition has been set up via swapon(8), we don't * need to bother with totals. */ diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index f0268229708..0a955b183c5 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: quot.c,v 1.10 2000/11/21 04:23:09 millert Exp $ */ +/* $OpenBSD: quot.c,v 1.11 2002/05/30 19:09:05 deraadt Exp $ */ /* $NetBSD: quot.c,v 1.7.4.1 1996/05/31 18:06:36 jtc Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: quot.c,v 1.10 2000/11/21 04:23:09 millert Exp $"; +static char rcsid[] = "$Id: quot.c,v 1.11 2002/05/30 19:09:05 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -87,7 +87,7 @@ get_inode(fd, super, ino) { static struct dinode *ip; static ino_t last; - + if (fd < 0) { /* flush cache */ if (ip) { free(ip); @@ -95,7 +95,7 @@ get_inode(fd, super, ino) } return 0; } - + if (!ip || ino < last || ino >= last + INOCNT(super)) { if (!ip && !(ip = (struct dinode *)malloc(INOSZ(super)))) err(1, "allocate inodes"); @@ -107,7 +107,7 @@ get_inode(fd, super, ino) err(1, "read inodes"); } } - + return ip + ino % INOCNT(super); } @@ -123,7 +123,7 @@ virtualblocks(super, ip) struct dinode *ip; { off_t nblk, sz; - + sz = ip->di_size; #ifdef COMPAT if (lblkno(super, sz) >= NDADDR) { @@ -131,10 +131,10 @@ virtualblocks(super, ip) if (sz == nblk) nblk += super->fs_bsize; } - + return sz / 1024; #else /* COMPAT */ - + if (lblkno(super, sz) >= NDADDR) { nblk = blkroundup(super, sz); sz = lblkno(super, nblk); @@ -146,7 +146,7 @@ virtualblocks(super, ip) } } else nblk = fragroundup(super, sz); - + return nblk / DEV_BSIZE; #endif /* COMPAT */ } @@ -186,7 +186,7 @@ inituser() { int i; struct user *usr; - + if (!nusers) { nusers = 8; if (!(users = @@ -207,7 +207,7 @@ usrrehash() int i; struct user *usr, *usrn; struct user *svusr; - + svusr = users; nusers <<= 1; if (!(users = (struct user *)calloc(nusers, sizeof(struct user)))) @@ -230,14 +230,14 @@ user(uid) int i; struct passwd *pwd; struct user *usr; - + while (1) { for (usr = users + (uid&(nusers - 1)), i = nusers; --i >= 0; usr--) { if (!usr->name) { usr->uid = uid; - + if (!(pwd = getpwuid(uid))) asprintf(&usr->name, "#%u", uid); else @@ -273,14 +273,14 @@ uses(uid, blks, act) { static time_t today; struct user *usr; - + if (!today) time(&today); - + usr = user(uid); usr->count++; usr->space += blks; - + if (today - act > 90L * 24L * 60L * 60L) usr->spc90 += blks; if (today - act > 60L * 24L * 60L * 60L) @@ -306,7 +306,7 @@ initfsizes() { struct fsizes *fp; int i; - + for (fp = fsizes; fp; fp = fp->fsz_next) { for (i = FSZCNT; --i >= 0;) { fp->fsz_count[i] = 0; @@ -326,7 +326,7 @@ dofsizes(fd, super, name) daddr_t sz, ksz; struct fsizes *fp, **fsp; int i; - + maxino = super->fs_ncg * super->fs_ipg - 1; #ifdef COMPAT if (!(fsizes = (struct fsizes *)malloc(sizeof(struct fsizes)))) @@ -399,7 +399,7 @@ douser(fd, super, name) struct user *usr, *usrs; struct dinode *ip; int n; - + maxino = super->fs_ncg * super->fs_ipg - 1; for (inode = 0; inode < maxino; inode++) { errno = 0; @@ -441,7 +441,7 @@ donames(fd, super, name) ino_t inode, inode1; ino_t maxino; struct dinode *ip; - + maxino = super->fs_ncg * super->fs_ipg - 1; /* first skip the name of the filesystem */ while ((c = getchar()) != EOF && (c < '0' || c > '9')) @@ -530,7 +530,7 @@ quot(name, mp) char *name, *mp; { int fd; - + get_inode(-1); /* flush cache */ inituser(); initfsizes(); @@ -568,7 +568,7 @@ main(argc, argv) int cnt, all, i; char dev[MNAMELEN], *nm, *mountpoint, *cp; struct statfs *mp; - + all = 0; func = douser; #ifndef COMPAT diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index b05b5347860..926f554aafe 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: rwhod.c,v 1.22 2002/03/14 16:44:25 mpech Exp $"; +static char rcsid[] = "$OpenBSD: rwhod.c,v 1.23 2002/05/30 19:09:05 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -137,7 +137,7 @@ main(argc, argv) struct pollfd pfd[1]; int on = 1, ch; char *cp; - + while ((ch = getopt(argc, argv, "d")) != -1) { switch (ch) { case 'd': diff --git a/usr.sbin/spray/spray.c b/usr.sbin/spray/spray.c index c6df61e2f14..dd5e1be2f49 100644 --- a/usr.sbin/spray/spray.c +++ b/usr.sbin/spray/spray.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: spray.c,v 1.1.1.1 1995/10/18 08:48:21 deraadt Exp $ + * $Id: spray.c,v 1.2 2002/05/30 19:09:05 deraadt Exp $ */ #include <stdio.h> @@ -118,7 +118,6 @@ main(argc, argv) /* Initialize spray argument */ host_array.sprayarr_len = length - SPRAYOVERHEAD; host_array.sprayarr_val = spray_buffer; - /* create connection with server */ cl = clnt_create(*argv, SPRAYPROG, SPRAYVERS, "udp"); @@ -127,10 +126,9 @@ main(argc, argv) exit(1); } - /* - * For some strange reason, RPC 4.0 sets the default timeout, - * thus timeouts specified in clnt_call() are always ignored. + * For some strange reason, RPC 4.0 sets the default timeout, + * thus timeouts specified in clnt_call() are always ignored. * * The following (undocumented) hack resets the internal state * of the client handle. @@ -139,7 +137,8 @@ main(argc, argv) /* Clear server statistics */ - if (clnt_call(cl, SPRAYPROC_CLEAR, xdr_void, NULL, xdr_void, NULL, TIMEOUT) != RPC_SUCCESS) { + if (clnt_call(cl, SPRAYPROC_CLEAR, xdr_void, NULL, xdr_void, NULL, + TIMEOUT) != RPC_SUCCESS) { clnt_perror(cl, progname); exit(1); } @@ -186,7 +185,7 @@ main(argc, argv) printf("Rcvd:"); print_xferstats(host_stats.counter, length, xmit_time); - + exit (0); } @@ -207,11 +206,11 @@ print_xferstats(packets, packetlen, xfertime) printf("\t%.0f packets/sec, ", pps); - if (bps >= 1024) + if (bps >= 1024) printf ("%.1fK ", bps / 1024); else printf ("%.0f ", bps); - + printf("bytes/sec\n"); } diff --git a/usr.sbin/tokenadm/tokenadm.c b/usr.sbin/tokenadm/tokenadm.c index 6ba981fc475..b70cf7c8f30 100644 --- a/usr.sbin/tokenadm/tokenadm.c +++ b/usr.sbin/tokenadm/tokenadm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tokenadm.c,v 1.3 2001/10/24 13:06:36 mpech Exp $ */ +/* $OpenBSD: tokenadm.c,v 1.4 2002/05/30 19:09:05 deraadt Exp $ */ /*- * Copyright (c) 1995 Migration Associates Corp. All Rights Reserved @@ -102,7 +102,7 @@ main(int argc, char **argv) if (setrlimit(RLIMIT_CORE, &cds) < 0) syslog(LOG_ERR, "couldn't set core dump size to 0: %m"); - while ((c = getopt(argc, argv, "BDERT1bdem:ru")) != -1) + while ((c = getopt(argc, argv, "BDERT1bdem:ru")) != -1) switch (c) { case 'B': if (what != LIST) @@ -209,7 +209,6 @@ usage: tt->name); exit(1); } - argv += optind - 1; while (*++argv) @@ -333,7 +332,7 @@ retry: } /* - * Force remove a user record-level lock. + * Force remove a user record-level lock. */ static int diff --git a/usr.sbin/usbdevs/usbdevs.c b/usr.sbin/usbdevs/usbdevs.c index ecce9a5ebfc..1c8dc6b7358 100644 --- a/usr.sbin/usbdevs/usbdevs.c +++ b/usr.sbin/usbdevs/usbdevs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdevs.c,v 1.6 2002/05/29 09:46:20 deraadt Exp $ */ +/* $OpenBSD: usbdevs.c,v 1.7 2002/05/30 19:09:05 deraadt Exp $ */ /* $NetBSD: usbdevs.c,v 1.19 2002/02/21 00:34:31 christos Exp $ */ /* @@ -128,11 +128,10 @@ usbdev(int f, int a, int rec) if (verbose) { printf("%*sport %d %s\n", indent+1, "", p+1, s == USB_PORT_ENABLED ? "enabled" : - s == USB_PORT_SUSPENDED ? "suspended" : + s == USB_PORT_SUSPENDED ? "suspended" : s == USB_PORT_POWERED ? "powered" : s == USB_PORT_DISABLED ? "disabled" : "???"); - } continue; } diff --git a/usr.sbin/vipw/vipw.c b/usr.sbin/vipw/vipw.c index 8fa6044e455..65bf8270ef7 100644 --- a/usr.sbin/vipw/vipw.c +++ b/usr.sbin/vipw/vipw.c @@ -116,7 +116,7 @@ copyfile(from, to) char buf[8*1024]; struct stat sb; struct timeval tv[2]; - + if (fstat(from, &sb) == -1) pw_error(_PATH_MASTERPASSWD, 1, 1); while ((nr = read(from, buf, sizeof(buf))) > 0) diff --git a/usr.sbin/wsmoused/wsmoused.c b/usr.sbin/wsmoused/wsmoused.c index db252ea5639..bb9ee107253 100644 --- a/usr.sbin/wsmoused/wsmoused.c +++ b/usr.sbin/wsmoused/wsmoused.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmoused.c,v 1.12 2002/05/26 09:32:44 deraadt Exp $ */ +/* $OpenBSD: wsmoused.c,v 1.13 2002/05/30 19:09:05 deraadt Exp $ */ /* * Copyright (c) 2001 Jean-Baptiste Marchand, Julien Montagne and Jerome Verdon @@ -329,7 +329,7 @@ treat_event(struct wscons_event *event) mouse_click(&mapped_event); return 1; } - if (event->type == WSCONS_EVENT_WSMOUSED_CLOSE) + if (event->type == WSCONS_EVENT_WSMOUSED_CLOSE) /* we have to close mouse fd */ return 0; return 1; @@ -414,9 +414,9 @@ wsmoused(void) /* get major and minor of mouse device */ res = stat(mouse.portname, &mdev_stat); - if (res != -1) + if (res != -1) event.value = mdev_stat.st_rdev; - else + else event.value = 0; } else @@ -446,7 +446,7 @@ wsmoused(void) read(mouse.mfd, &event, sizeof(event)); res = treat_event(&event); if (!res) { - /* close mouse device and sleep until + /* close mouse device and sleep until the X server release it */ struct wscons_event sleeping; @@ -457,19 +457,19 @@ wsmoused(void) close(mouse.mfd); mouse.mfd = -1; - + /* sleep until X server releases mouse device */ sleeping.type = WSCONS_EVENT_WSMOUSED_SLEEP; sleeping.value = 0; - ioctl(mouse.cfd, WSDISPLAYIO_WSMOUSED, + ioctl(mouse.cfd, WSDISPLAYIO_WSMOUSED, &sleeping); /* waiting for availability of mouse device */ sleep(1); - if ((mouse.mfd = open(mouse.portname, - O_RDONLY | O_NONBLOCK, 0)) == -1) - logerr(1, "unable to open %s", + if ((mouse.mfd = open(mouse.portname, + O_RDONLY | O_NONBLOCK, 0)) == -1) + logerr(1, "unable to open %s", mouse.portname); mouse_init(); } diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index a2e1a7fb67f..1c1d3d08ecb 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypbind.c,v 1.43 2002/03/14 16:44:25 mpech Exp $ */ +/* $OpenBSD: ypbind.c,v 1.44 2002/05/30 19:09:06 deraadt Exp $ */ /* * Copyright (c) 1997,1998 Theo de Raadt <deraadt@OpenBSD.org> @@ -35,7 +35,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypbind.c,v 1.43 2002/03/14 16:44:25 mpech Exp $"; +static char rcsid[] = "$OpenBSD: ypbind.c,v 1.44 2002/05/30 19:09:06 deraadt Exp $"; #endif #include <sys/param.h> @@ -577,7 +577,7 @@ main(argc, argv) * State transition is done like this: * * STATE EVENT ACTION NEWSTATE TIMEOUT - * no binding timeout broadcast no binding 5 sec + * no binding timeout broadcast no binding 5 sec * no binding answer -- binding 60 sec * binding timeout ping server checking 5 sec * checking timeout ping server + broadcast checking 5 sec @@ -1019,7 +1019,7 @@ int force; } return; } - + memcpy(&ypdb->dom_server_addr, raddrp, sizeof ypdb->dom_server_addr); /* recheck binding in 60 seconds */ ypdb->dom_check_t = time(NULL) + 60; diff --git a/usr.sbin/yppoll/yppoll.c b/usr.sbin/yppoll/yppoll.c index 6d0cbbc8848..6e8087843bf 100644 --- a/usr.sbin/yppoll/yppoll.c +++ b/usr.sbin/yppoll/yppoll.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yppoll.c,v 1.3 1997/06/23 01:05:10 deraadt Exp $ */ +/* $OpenBSD: yppoll.c,v 1.4 2002/05/30 19:09:06 deraadt Exp $ */ /* $NetBSD: yppoll.c,v 1.5 1996/05/13 02:46:36 thorpej Exp $ */ /* @@ -36,7 +36,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: yppoll.c,v 1.3 1997/06/23 01:05:10 deraadt Exp $"; +static char rcsid[] = "$Id: yppoll.c,v 1.4 2002/05/30 19:09:06 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -105,7 +105,7 @@ get_remote_info(indomain, inmap, server, outorder, outname) server); exit(1); } - + yprnk.domain = indomain; yprnk.map = inmap; diff --git a/usr.sbin/ypset/ypset.c b/usr.sbin/ypset/ypset.c index 2cdd551133a..04651ce7182 100644 --- a/usr.sbin/ypset/ypset.c +++ b/usr.sbin/ypset/ypset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypset.c,v 1.5 1997/07/21 19:18:34 deraadt Exp $ */ +/* $OpenBSD: ypset.c,v 1.6 2002/05/30 19:09:06 deraadt Exp $ */ /* $NetBSD: ypset.c,v 1.8 1996/05/13 02:46:33 thorpej Exp $ */ /* @@ -34,7 +34,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypset.c,v 1.5 1997/07/21 19:18:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ypset.c,v 1.6 2002/05/30 19:09:06 deraadt Exp $"; #endif #include <sys/param.h> @@ -73,7 +73,7 @@ char *dom, *server; int sock, port; int r; struct in_addr iaddr; - + if( (port=htons(getrpcport(server, YPPROG, YPPROC_NULL, IPPROTO_UDP))) == 0) { fprintf(stderr, "%s not running ypserv.\n", server); exit(1); @@ -95,7 +95,7 @@ char *dom, *server; bcopy(&port, &ypsd.ypsetdom_binding.ypbind_binding_port, sizeof(ypsd.ypsetdom_binding.ypbind_binding_port)); ypsd.ypsetdom_vers = YPVERS; - + tv.tv_sec = 15; tv.tv_usec = 0; sock = RPC_ANYSOCK; |