From 0fb8fdab47c4cda209fc526dd7ef7290274e96b6 Mon Sep 17 00:00:00 2001 From: wiz Date: Sat, 6 Jul 2002 22:08:30 +0000 Subject: [PATCH] ANSIfy, remove __P(). --- usr.sbin/timed/timed/acksend.c | 8 +++----- usr.sbin/timed/timed/byteorder.c | 8 +++----- usr.sbin/timed/timed/candidate.c | 5 ++--- usr.sbin/timed/timed/master.c | 10 +++++----- usr.sbin/timed/timed/networkdelta.c | 6 +++--- usr.sbin/timed/timed/readmsg.c | 14 ++++++-------- usr.sbin/timed/timed/slave.c | 6 +++--- usr.sbin/timed/timed/timed.c | 17 +++++++---------- 8 files changed, 32 insertions(+), 42 deletions(-) diff --git a/usr.sbin/timed/timed/acksend.c b/usr.sbin/timed/timed/acksend.c index e53d325d4fbf..6862aca4c63c 100644 --- a/usr.sbin/timed/timed/acksend.c +++ b/usr.sbin/timed/timed/acksend.c @@ -1,4 +1,4 @@ -/* $NetBSD: acksend.c,v 1.6 2001/09/02 00:13:05 reinoud Exp $ */ +/* $NetBSD: acksend.c,v 1.7 2002/07/06 22:08:30 wiz Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)acksend.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: acksend.c,v 1.6 2001/09/02 00:13:05 reinoud Exp $"); +__RCSID("$NetBSD: acksend.c,v 1.7 2002/07/06 22:08:30 wiz Exp $"); #endif #endif /* not lint */ @@ -50,9 +50,7 @@ struct tsp *answer; extern u_short sequence; void -xmit(int type, - u_short seq, - struct sockaddr_in *addr) +xmit(int type, u_short seq, struct sockaddr_in *addr) { static struct tsp msg; diff --git a/usr.sbin/timed/timed/byteorder.c b/usr.sbin/timed/timed/byteorder.c index 5252edb285ab..3951cc7b0762 100644 --- a/usr.sbin/timed/timed/byteorder.c +++ b/usr.sbin/timed/timed/byteorder.c @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)byteorder.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: byteorder.c,v 1.6 2001/09/02 00:13:05 reinoud Exp $"); +__RCSID("$NetBSD: byteorder.c,v 1.7 2002/07/06 22:08:31 wiz Exp $"); #endif #endif /* not lint */ @@ -47,8 +47,7 @@ __RCSID("$NetBSD: byteorder.c,v 1.6 2001/09/02 00:13:05 reinoud Exp $"); * messages. Protocol is defined in /usr/include/protocols/timed.h */ void -bytenetorder(ptr) - struct tsp *ptr; +bytenetorder(struct tsp *ptr) { ptr->tsp_seq = htons((u_short)ptr->tsp_seq); switch (ptr->tsp_type) { @@ -67,8 +66,7 @@ bytenetorder(ptr) } void -bytehostorder(ptr) - struct tsp *ptr; +bytehostorder(struct tsp *ptr) { ptr->tsp_seq = ntohs((u_short)ptr->tsp_seq); switch (ptr->tsp_type) { diff --git a/usr.sbin/timed/timed/candidate.c b/usr.sbin/timed/timed/candidate.c index cd8184fcbaa6..a7701827c51a 100644 --- a/usr.sbin/timed/timed/candidate.c +++ b/usr.sbin/timed/timed/candidate.c @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)candidate.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: candidate.c,v 1.7 2001/09/02 00:13:05 reinoud Exp $"); +__RCSID("$NetBSD: candidate.c,v 1.8 2002/07/06 22:08:31 wiz Exp $"); #endif #endif /* not lint */ @@ -49,8 +49,7 @@ __RCSID("$NetBSD: candidate.c,v 1.7 2001/09/02 00:13:05 reinoud Exp $"); * candidate sends an election request, the candidature is withdrawn. */ int -election(net) - struct netinfo *net; +election(struct netinfo *net) { struct tsp *resp, msg; struct timeval then, wait; diff --git a/usr.sbin/timed/timed/master.c b/usr.sbin/timed/timed/master.c index 255bfdf32fa5..f0374b322b00 100644 --- a/usr.sbin/timed/timed/master.c +++ b/usr.sbin/timed/timed/master.c @@ -1,4 +1,4 @@ -/* $NetBSD: master.c,v 1.9 2001/09/02 00:13:06 reinoud Exp $ */ +/* $NetBSD: master.c,v 1.10 2002/07/06 22:08:31 wiz Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)master.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: master.c,v 1.9 2001/09/02 00:13:06 reinoud Exp $"); +__RCSID("$NetBSD: master.c,v 1.10 2002/07/06 22:08:31 wiz Exp $"); #endif #endif /* not lint */ @@ -61,7 +61,7 @@ static int slvcount; /* slaves listening to our clock */ static void mchgdate(struct tsp*); -extern void logwtmp __P((char *, char *, char *)); +extern void logwtmp(char *, char *, char *); @@ -75,7 +75,7 @@ extern void logwtmp __P((char *, char *, char *)); * takes the appropriate action. */ int -master() +master(void) { struct hosttbl *htp; long pollingtime; @@ -466,7 +466,7 @@ synch(long mydelta) * has received the command to set the network time */ void -spreadtime() +spreadtime(void) { struct hosttbl *htp; struct tsp to; diff --git a/usr.sbin/timed/timed/networkdelta.c b/usr.sbin/timed/timed/networkdelta.c index 317ee7c540cb..294d8210b177 100644 --- a/usr.sbin/timed/timed/networkdelta.c +++ b/usr.sbin/timed/timed/networkdelta.c @@ -1,4 +1,4 @@ -/* $NetBSD: networkdelta.c,v 1.9 2001/09/02 00:13:06 reinoud Exp $ */ +/* $NetBSD: networkdelta.c,v 1.10 2002/07/06 22:08:31 wiz Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)networkdelta.c 8.3 (Berkeley) 4/27/95"; #else -__RCSID("$NetBSD: networkdelta.c,v 1.9 2001/09/02 00:13:06 reinoud Exp $"); +__RCSID("$NetBSD: networkdelta.c,v 1.10 2002/07/06 22:08:31 wiz Exp $"); #endif #endif /* not lint */ @@ -69,7 +69,7 @@ static long median(float, float*, long*, long*, unsigned int); * bad values. */ long -networkdelta() +networkdelta(void) { struct hosttbl *htp; long med; diff --git a/usr.sbin/timed/timed/readmsg.c b/usr.sbin/timed/timed/readmsg.c index 05311478ad79..5079dd4cbf97 100644 --- a/usr.sbin/timed/timed/readmsg.c +++ b/usr.sbin/timed/timed/readmsg.c @@ -1,4 +1,4 @@ -/* $NetBSD: readmsg.c,v 1.11 2001/09/02 00:13:07 reinoud Exp $ */ +/* $NetBSD: readmsg.c,v 1.12 2002/07/06 22:08:31 wiz Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)readmsg.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: readmsg.c,v 1.11 2001/09/02 00:13:07 reinoud Exp $"); +__RCSID("$NetBSD: readmsg.c,v 1.12 2002/07/06 22:08:31 wiz Exp $"); #endif #endif /* not lint */ @@ -343,7 +343,7 @@ again: * only the type ACK is to be sent by a slave */ void -slaveack() +slaveack(void) { switch(msgin.tsp_type) { @@ -375,7 +375,7 @@ slaveack() * These packets should be acknowledged. */ void -ignoreack() +ignoreack(void) { switch(msgin.tsp_type) { @@ -403,7 +403,7 @@ ignoreack() * to the messages received by a master */ void -masterack() +masterack(void) { struct tsp resp; @@ -446,9 +446,7 @@ masterack() * Print a TSP message */ void -print(msg, addr) -struct tsp *msg; -struct sockaddr_in *addr; +print(struct tsp *msg, struct sockaddr_in *addr) { char tm[26]; time_t msgtime; diff --git a/usr.sbin/timed/timed/slave.c b/usr.sbin/timed/timed/slave.c index bccd2ebe8da3..281758a07e62 100644 --- a/usr.sbin/timed/timed/slave.c +++ b/usr.sbin/timed/timed/slave.c @@ -1,4 +1,4 @@ -/* $NetBSD: slave.c,v 1.9 2001/09/02 00:13:07 reinoud Exp $ */ +/* $NetBSD: slave.c,v 1.10 2002/07/06 22:08:31 wiz Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)slave.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: slave.c,v 1.9 2001/09/02 00:13:07 reinoud Exp $"); +__RCSID("$NetBSD: slave.c,v 1.10 2002/07/06 22:08:31 wiz Exp $"); #endif #endif /* not lint */ @@ -64,7 +64,7 @@ extern void logwtmp(char *, char *, char *); int -slave() +slave(void) { int tries; long electiontime, refusetime, looktime, looptime, adjtime; diff --git a/usr.sbin/timed/timed/timed.c b/usr.sbin/timed/timed/timed.c index 1078c04ae433..e2a8ca4fd66a 100644 --- a/usr.sbin/timed/timed/timed.c +++ b/usr.sbin/timed/timed/timed.c @@ -1,4 +1,4 @@ -/* $NetBSD: timed.c,v 1.14 2002/06/23 17:47:45 perry Exp $ */ +/* $NetBSD: timed.c,v 1.15 2002/07/06 22:08:31 wiz Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -44,7 +44,7 @@ __COPYRIGHT( #if 0 static char sccsid[] = "@(#)timed.c 8.2 (Berkeley) 3/26/95"; #else -__RCSID("$NetBSD: timed.c,v 1.14 2002/06/23 17:47:45 perry Exp $"); +__RCSID("$NetBSD: timed.c,v 1.15 2002/07/06 22:08:31 wiz Exp $"); #endif #endif /* not lint */ @@ -117,7 +117,7 @@ static void add_good_host(char*,char); */ int -main(int argc, char **argv) +main(int argc, char *argv[]) { int on; int ret; @@ -473,9 +473,7 @@ main(int argc, char **argv) /* suppress an upstart, untrustworthy, self-appointed master */ void -suppress(struct sockaddr_in *addr, - char *name, - struct netinfo *net) +suppress(struct sockaddr_in *addr, char *name, struct netinfo *net) { struct sockaddr_in tgt; char tname[MAXHOSTNAMELEN]; @@ -599,7 +597,7 @@ lookformaster(struct netinfo *ntp) * networks; */ void -setstatus() +setstatus(void) { struct netinfo *ntp; @@ -718,7 +716,7 @@ casual(long inf, long sup) } char * -date() +date(void) { struct timeval tv; time_t t; @@ -846,8 +844,7 @@ get_goodgroup(int force) /* see if a machine is trustworthy */ int /* 1=trust hp to change our date */ -good_host_name(name) - char *name; +good_host_name(char *name) { register struct goodhost *ghp = goodhosts; register char c;