remove obsolete register declarations.

This commit is contained in:
perry 2005-02-06 04:56:27 +00:00
parent d777c795fa
commit 9cdb3caf29
6 changed files with 38 additions and 38 deletions

View File

@ -32,7 +32,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)cksum.c 5.2 (Berkeley) 5/11/93"; static char sccsid[] = "@(#)cksum.c 5.2 (Berkeley) 5/11/93";
#else #else
__RCSID("$NetBSD: cksum.c,v 1.4 2003/08/07 11:25:46 agc Exp $"); __RCSID("$NetBSD: cksum.c,v 1.5 2005/02/06 04:56:27 perry Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -53,10 +53,10 @@ __RCSID("$NetBSD: cksum.c,v 1.4 2003/08/07 11:25:46 agc Exp $");
int int
in_cksum(u_short *addr, int len) in_cksum(u_short *addr, int len)
{ {
register int nleft = len; int nleft = len;
register u_short *w = addr; u_short *w = addr;
register u_short answer; u_short answer;
register int sum = 0; int sum = 0;
/* /*
* Our algorithm is simple, using a 32 bit accumulator (sum), * Our algorithm is simple, using a 32 bit accumulator (sum),

View File

@ -1,4 +1,4 @@
/* $NetBSD: measure.c,v 1.11 2003/08/07 11:25:46 agc Exp $ */ /* $NetBSD: measure.c,v 1.12 2005/02/06 04:56:27 perry Exp $ */
/*- /*-
* Copyright (c) 1985, 1993 The Regents of the University of California. * Copyright (c) 1985, 1993 The Regents of the University of California.
@ -34,7 +34,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)measure.c 8.2 (Berkeley) 3/26/95"; static char sccsid[] = "@(#)measure.c 8.2 (Berkeley) 3/26/95";
#else #else
__RCSID("$NetBSD: measure.c,v 1.11 2003/08/07 11:25:46 agc Exp $"); __RCSID("$NetBSD: measure.c,v 1.12 2005/02/06 04:56:27 perry Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -79,8 +79,8 @@ measure(u_long maxmsec, /* wait this many msec at most */
long min_idelta, min_odelta; long min_idelta, min_odelta;
struct timeval tdone, tcur, ttrans, twait, tout; struct timeval tdone, tcur, ttrans, twait, tout;
u_char packet[PACKET_IN], opacket[64]; u_char packet[PACKET_IN], opacket[64];
register struct icmp *icp = (struct icmp *) packet; struct icmp *icp = (struct icmp *) packet;
register struct icmp *oicp = (struct icmp *) opacket; struct icmp *oicp = (struct icmp *) opacket;
struct ip *ip = (struct ip *) packet; struct ip *ip = (struct ip *) packet;
min_idelta = min_odelta = 0x7fffffff; min_idelta = min_odelta = 0x7fffffff;

View File

@ -1,4 +1,4 @@
/* $NetBSD: readmsg.c,v 1.16 2003/08/07 11:25:46 agc Exp $ */ /* $NetBSD: readmsg.c,v 1.17 2005/02/06 04:56:27 perry Exp $ */
/*- /*-
* Copyright (c) 1985, 1993 The Regents of the University of California. * Copyright (c) 1985, 1993 The Regents of the University of California.
@ -34,7 +34,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)readmsg.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)readmsg.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: readmsg.c,v 1.16 2003/08/07 11:25:46 agc Exp $"); __RCSID("$NetBSD: readmsg.c,v 1.17 2005/02/06 04:56:27 perry Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -82,8 +82,8 @@ readmsg(int type, char *machfrom, struct timeval *intvl,
static struct tsplist *tail = &msgslist; static struct tsplist *tail = &msgslist;
static int msgcnt = 0; static int msgcnt = 0;
struct tsplist *prev; struct tsplist *prev;
register struct netinfo *ntp; struct netinfo *ntp;
register struct tsplist *ptr; struct tsplist *ptr;
ssize_t n; ssize_t n;
if (trace) { if (trace) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: timed.c,v 1.19 2003/08/18 05:39:53 itojun Exp $ */ /* $NetBSD: timed.c,v 1.20 2005/02/06 04:56:27 perry Exp $ */
/*- /*-
* Copyright (c) 1985, 1993 The Regents of the University of California. * Copyright (c) 1985, 1993 The Regents of the University of California.
@ -40,7 +40,7 @@ __COPYRIGHT(
#if 0 #if 0
static char sccsid[] = "@(#)timed.c 8.2 (Berkeley) 3/26/95"; static char sccsid[] = "@(#)timed.c 8.2 (Berkeley) 3/26/95";
#else #else
__RCSID("$NetBSD: timed.c,v 1.19 2003/08/18 05:39:53 itojun Exp $"); __RCSID("$NetBSD: timed.c,v 1.20 2005/02/06 04:56:27 perry Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -125,7 +125,7 @@ main(int argc, char *argv[])
int nflag, iflag; int nflag, iflag;
struct timeval ntime; struct timeval ntime;
struct servent *srvp; struct servent *srvp;
register struct netinfo *ntp; struct netinfo *ntp;
struct netinfo *ntip; struct netinfo *ntip;
struct netinfo *savefromnet; struct netinfo *savefromnet;
struct netent *nentp; struct netent *nentp;
@ -627,7 +627,7 @@ setstatus(void)
void void
makeslave(struct netinfo *net) makeslave(struct netinfo *net)
{ {
register struct netinfo *ntp; struct netinfo *ntp;
for (ntp = nettab; ntp != NULL; ntp = ntp->next) { for (ntp = nettab; ntp != NULL; ntp = ntp->next) {
if (ntp->status == SLAVE && ntp != net) if (ntp->status == SLAVE && ntp != net)
@ -642,7 +642,7 @@ makeslave(struct netinfo *net)
static void static void
checkignorednets(void) checkignorednets(void)
{ {
register struct netinfo *ntp; struct netinfo *ntp;
for (ntp = nettab; ntp != NULL; ntp = ntp->next) { for (ntp = nettab; ntp != NULL; ntp = ntp->next) {
if (!Mflag && ntp->status == SLAVE) if (!Mflag && ntp->status == SLAVE)
@ -704,7 +704,7 @@ date(void)
void void
addnetname(char *name) addnetname(char *name)
{ {
register struct nets **netlist = &nets; struct nets **netlist = &nets;
while (*netlist) while (*netlist)
netlist = &((*netlist)->next); netlist = &((*netlist)->next);
@ -722,8 +722,8 @@ static void
add_good_host(const char* name, add_good_host(const char* name,
char perm) /* 1=not part of the netgroup */ char perm) /* 1=not part of the netgroup */
{ {
register struct goodhost *ghp; struct goodhost *ghp;
register struct hostent *hentp; struct hostent *hentp;
ghp = (struct goodhost*)malloc(sizeof(*ghp)); ghp = (struct goodhost*)malloc(sizeof(*ghp));
if (!ghp) { if (!ghp) {
@ -821,8 +821,8 @@ get_goodgroup(int force)
int /* 1=trust hp to change our date */ int /* 1=trust hp to change our date */
good_host_name(char *name) good_host_name(char *name)
{ {
register struct goodhost *ghp = goodhosts; struct goodhost *ghp = goodhosts;
register char c; char c;
if (!ghp || !Mflag) /* trust everyone if no one named */ if (!ghp || !Mflag) /* trust everyone if no one named */
return 1; return 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmds.c,v 1.15 2004/02/09 15:43:05 wiz Exp $ */ /* $NetBSD: cmds.c,v 1.16 2005/02/06 04:56:27 perry Exp $ */
/*- /*-
* Copyright (c) 1985, 1993 The Regents of the University of California. * Copyright (c) 1985, 1993 The Regents of the University of California.
@ -34,7 +34,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 3/26/95"; static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 3/26/95";
#else #else
__RCSID("$NetBSD: cmds.c,v 1.15 2004/02/09 15:43:05 wiz Exp $"); __RCSID("$NetBSD: cmds.c,v 1.16 2005/02/06 04:56:27 perry Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -166,8 +166,8 @@ clockdiff(int argc, char *argv[])
{ {
int measure_status; int measure_status;
extern int measure(u_long, u_long, char *, struct sockaddr_in*, int); extern int measure(u_long, u_long, char *, struct sockaddr_in*, int);
register int avg_cnt; int avg_cnt;
register long avg; long avg;
struct servent *sp; struct servent *sp;
if (argc < 2) { if (argc < 2) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: timedc.c,v 1.12 2004/10/30 15:54:29 dsl Exp $ */ /* $NetBSD: timedc.c,v 1.13 2005/02/06 04:56:27 perry Exp $ */
/*- /*-
* Copyright (c) 1985, 1993 The Regents of the University of California. * Copyright (c) 1985, 1993 The Regents of the University of California.
@ -40,7 +40,7 @@ __COPYRIGHT(
#if 0 #if 0
static char sccsid[] = "@(#)timedc.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)timedc.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: timedc.c,v 1.12 2004/10/30 15:54:29 dsl Exp $"); __RCSID("$NetBSD: timedc.c,v 1.13 2005/02/06 04:56:27 perry Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -66,7 +66,7 @@ static struct cmd *getcmd(char *);
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
register struct cmd *c; struct cmd *c;
openlog("timedc", 0, LOG_AUTH); openlog("timedc", 0, LOG_AUTH);
@ -146,9 +146,9 @@ intr(int signo)
static struct cmd * static struct cmd *
getcmd(char *name) getcmd(char *name)
{ {
register char *p, *q; char *p, *q;
register struct cmd *c, *found; struct cmd *c, *found;
register int nmatches, longest; int nmatches, longest;
extern struct cmd cmdtab[]; extern struct cmd cmdtab[];
extern int NCMDS; extern int NCMDS;
@ -180,8 +180,8 @@ getcmd(char *name)
int int
makeargv(void) makeargv(void)
{ {
register char *cp; char *cp;
register char **argp = margv; char **argp = margv;
margc = 0; margc = 0;
for (cp = cmdline; cp < margv[MAX_MARGV - 1] && *cp;) { for (cp = cmdline; cp < margv[MAX_MARGV - 1] && *cp;) {
@ -211,11 +211,11 @@ makeargv(void)
void void
help(int argc, char *argv[]) help(int argc, char *argv[])
{ {
register struct cmd *c; struct cmd *c;
extern struct cmd cmdtab[]; extern struct cmd cmdtab[];
if (argc == 1) { if (argc == 1) {
register int i, j, w; int i, j, w;
int columns, width = 0, lines; int columns, width = 0, lines;
extern int NCMDS; extern int NCMDS;
@ -249,7 +249,7 @@ help(int argc, char *argv[])
return; return;
} }
while (--argc > 0) { while (--argc > 0) {
register char *arg; char *arg;
arg = *++argv; arg = *++argv;
c = getcmd(arg); c = getcmd(arg);
if (c == (struct cmd *)-1) if (c == (struct cmd *)-1)