summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-11-15 20:35:37 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-11-15 20:35:37 +0000
commitb2d2bdc05d33297b07ec9ce0b01af39212d7adb6 (patch)
tree579fb6d21ac8a846de516c67ef4cf1c67384788a
parent47042828719ac1cef4b466151fee3ff5c7386adc (diff)
Remove more register keywords.
ok daniel@, discussed on hackers@
-rw-r--r--usr.sbin/tcpdump/gmt2local.c6
-rw-r--r--usr.sbin/tcpdump/interface.h6
-rw-r--r--usr.sbin/tcpdump/nameser.h14
-rw-r--r--usr.sbin/tcpdump/parsenfsfh.c8
-rw-r--r--usr.sbin/tcpdump/print-arp.c10
-rw-r--r--usr.sbin/tcpdump/print-atalk.c60
-rw-r--r--usr.sbin/tcpdump/print-bootp.c24
-rw-r--r--usr.sbin/tcpdump/print-carp.c4
-rw-r--r--usr.sbin/tcpdump/print-cnfp.c10
9 files changed, 71 insertions, 71 deletions
diff --git a/usr.sbin/tcpdump/gmt2local.c b/usr.sbin/tcpdump/gmt2local.c
index 0e4bff30de1..0c85eb6f399 100644
--- a/usr.sbin/tcpdump/gmt2local.c
+++ b/usr.sbin/tcpdump/gmt2local.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gmt2local.c,v 1.6 2015/04/05 17:02:57 guenther Exp $ */
+/* $OpenBSD: gmt2local.c,v 1.7 2015/11/15 20:35:36 mmcc Exp $ */
/*
* Copyright (c) 1997
@@ -43,8 +43,8 @@
int32_t
gmt2local(time_t t)
{
- register int dt, dir;
- register struct tm *gmt, *loc;
+ int dt, dir;
+ struct tm *gmt, *loc;
struct tm sgmt;
if (t == 0)
diff --git a/usr.sbin/tcpdump/interface.h b/usr.sbin/tcpdump/interface.h
index 25f35a0e853..c915133f15c 100644
--- a/usr.sbin/tcpdump/interface.h
+++ b/usr.sbin/tcpdump/interface.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.h,v 1.65 2015/04/05 17:02:57 guenther Exp $ */
+/* $OpenBSD: interface.h,v 1.66 2015/11/15 20:35:36 mmcc Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -20,7 +20,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Id: interface.h,v 1.65 2015/04/05 17:02:57 guenther Exp $ (LBL)
+ * @(#) $Id: interface.h,v 1.66 2015/11/15 20:35:36 mmcc Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
@@ -287,5 +287,5 @@ extern void ospf6_print(const u_char *, u_int);
extern void dhcp6_print(const u_char *, u_int, u_short, u_short);
#endif /*INET6*/
-extern u_short in_cksum(const u_short *addr, register int len, int csum);
+extern u_short in_cksum(const u_short *addr, int len, int csum);
extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t);
diff --git a/usr.sbin/tcpdump/nameser.h b/usr.sbin/tcpdump/nameser.h
index 8ae9c8b8e0f..ddb5e065c4a 100644
--- a/usr.sbin/tcpdump/nameser.h
+++ b/usr.sbin/tcpdump/nameser.h
@@ -1,4 +1,4 @@
-/* @(#) $Id: nameser.h,v 1.7 2014/05/23 20:36:04 sthen Exp $ (LBL) */
+/* @(#) $Id: nameser.h,v 1.8 2015/11/15 20:35:36 mmcc Exp $ (LBL) */
/*
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -249,13 +249,13 @@ struct rrec {
* portable or it can be elegant but never both.
*/
#define GETSHORT(s, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
+ u_char *t_cp = (u_char *)(cp); \
(s) = ((u_int16_t)t_cp[0] << 8) | (u_int16_t)t_cp[1]; \
(cp) += 2; \
}
#define GETLONG(l, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
+ u_char *t_cp = (u_char *)(cp); \
(l) = (((u_int32_t)t_cp[0]) << 24) \
| (((u_int32_t)t_cp[1]) << 16) \
| (((u_int32_t)t_cp[2]) << 8) \
@@ -264,8 +264,8 @@ struct rrec {
}
#define PUTSHORT(s, cp) { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
+ u_int16_t t_s = (u_int16_t)(s); \
+ u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_s >> 8; \
*t_cp = t_s; \
(cp) += 2; \
@@ -276,8 +276,8 @@ struct rrec {
* were depending on this "feature", you will lose.
*/
#define PUTLONG(l, cp) { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
+ u_int32_t t_l = (u_int32_t)(l); \
+ u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_l >> 24; \
*t_cp++ = t_l >> 16; \
*t_cp++ = t_l >> 8; \
diff --git a/usr.sbin/tcpdump/parsenfsfh.c b/usr.sbin/tcpdump/parsenfsfh.c
index 1652be88ae0..f2dc388a605 100644
--- a/usr.sbin/tcpdump/parsenfsfh.c
+++ b/usr.sbin/tcpdump/parsenfsfh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parsenfsfh.c,v 1.10 2009/10/27 23:59:55 deraadt Exp $ */
+/* $OpenBSD: parsenfsfh.c,v 1.11 2015/11/15 20:35:36 mmcc Exp $ */
/*
* Copyright (c) 1993, 1994 Jeffrey C. Mogul, Digital Equipment Corporation,
@@ -106,14 +106,14 @@ static int is_UCX(unsigned char *);
void
Parse_fh(fh, fsidp, inop, osnamep, fsnamep, ourself)
-register caddr_t *fh;
+caddr_t *fh;
my_fsid *fsidp;
ino_t *inop;
char **osnamep; /* if non-NULL, return OS name here */
char **fsnamep; /* if non-NULL, return server fs name here (for VMS) */
int ourself; /* true if file handle was generated on this host */
{
- register unsigned char *fhp = (unsigned char *)fh;
+ unsigned char *fhp = (unsigned char *)fh;
u_int32_t temp;
int fhtype = FHT_UNKNOWN;
@@ -429,7 +429,7 @@ static int
is_UCX(fhp)
unsigned char *fhp;
{
- register int i;
+ int i;
int seen_null = 0;
for (i = 1; i < 14; i++) {
diff --git a/usr.sbin/tcpdump/print-arp.c b/usr.sbin/tcpdump/print-arp.c
index 4d4b97ffeea..ec66e119350 100644
--- a/usr.sbin/tcpdump/print-arp.c
+++ b/usr.sbin/tcpdump/print-arp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-arp.c,v 1.13 2015/01/16 06:40:21 deraadt Exp $ */
+/* $OpenBSD: print-arp.c,v 1.14 2015/11/15 20:35:36 mmcc Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -51,11 +51,11 @@ struct rtentry;
static u_char ezero[6];
void
-arp_print(register const u_char *bp, u_int length, u_int caplen)
+arp_print(const u_char *bp, u_int length, u_int caplen)
{
- register const struct ether_arp *ap;
- register const struct ether_header *eh;
- register u_short pro, hrd, op;
+ const struct ether_arp *ap;
+ const struct ether_header *eh;
+ u_short pro, hrd, op;
ap = (struct ether_arp *)bp;
if ((u_char *)(ap + 1) > snapend) {
diff --git a/usr.sbin/tcpdump/print-atalk.c b/usr.sbin/tcpdump/print-atalk.c
index 7362ee264fe..bc995619007 100644
--- a/usr.sbin/tcpdump/print-atalk.c
+++ b/usr.sbin/tcpdump/print-atalk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-atalk.c,v 1.29 2015/08/21 02:07:32 deraadt Exp $ */
+/* $OpenBSD: print-atalk.c,v 1.30 2015/11/15 20:35:36 mmcc Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -93,9 +93,9 @@ static const char *ddpskt_string(int);
* from Ethertalk)
*/
void
-atalk_print(register const u_char *bp, u_int length)
+atalk_print(const u_char *bp, u_int length)
{
- register const struct atDDP *dp;
+ const struct atDDP *dp;
u_short snet;
if (length < ddpSize) {
@@ -121,11 +121,11 @@ atalk_print(register const u_char *bp, u_int length)
* interface if we have one, or from UDP encapsulated tunnels.
*/
void
-atalk_print_llap(register const u_char *bp, u_int length)
+atalk_print_llap(const u_char *bp, u_int length)
{
- register const struct LAP *lp;
- register const struct atDDP *dp;
- register const struct atShortDDP *sdp;
+ const struct LAP *lp;
+ const struct atDDP *dp;
+ const struct atShortDDP *sdp;
u_short snet;
lp = (struct LAP *)bp;
@@ -180,9 +180,9 @@ atalk_print_llap(register const u_char *bp, u_int length)
/* XXX should probably pass in the snap header and do checks like arp_print() */
void
-aarp_print(register const u_char *bp, u_int length)
+aarp_print(const u_char *bp, u_int length)
{
- register const struct aarp *ap;
+ const struct aarp *ap;
#define AT(member) ataddr_string((ap->member[1]<<8)|ap->member[2],ap->member[3])
@@ -213,8 +213,8 @@ aarp_print(register const u_char *bp, u_int length)
}
static void
-ddp_print(register const u_char *bp, register u_int length, register int t,
- register u_short snet, register u_char snode, u_char skt)
+ddp_print(const u_char *bp, u_int length, int t,
+ u_short snet, u_char snode, u_char skt)
{
if ((intptr_t)bp & (sizeof(long)-1)) {
@@ -251,7 +251,7 @@ ddp_print(register const u_char *bp, register u_int length, register int t,
}
static void
-atp_print(register const struct atATP *ap, u_int length)
+atp_print(const struct atATP *ap, u_int length)
{
char c;
u_int32_t data;
@@ -343,10 +343,10 @@ atp_print(register const struct atATP *ap, u_int length)
}
static void
-atp_bitmap_print(register u_char bm)
+atp_bitmap_print(u_char bm)
{
- register char c;
- register int i;
+ char c;
+ int i;
/*
* The '& 0xff' below is needed for compilers that want to sign
@@ -374,10 +374,10 @@ atp_bitmap_print(register u_char bm)
}
static void
-nbp_print(register const struct atNBP *np, u_int length, register u_short snet,
- register u_char snode, register u_char skt)
+nbp_print(const struct atNBP *np, u_int length, u_short snet,
+ u_char snode, u_char skt)
{
- register const struct atNBPtuple *tp =
+ const struct atNBPtuple *tp =
(struct atNBPtuple *)((u_char *)np + nbpHeaderSize);
int i;
const u_char *ep;
@@ -461,9 +461,9 @@ nbp_print(register const struct atNBP *np, u_int length, register u_short snet,
/* print a counted string */
static const char *
-print_cstring(register const char *cp, register const u_char *ep)
+print_cstring(const char *cp, const u_char *ep)
{
- register u_int length;
+ u_int length;
if (cp >= (const char *)ep) {
fputs(tstr, stdout);
@@ -487,12 +487,12 @@ print_cstring(register const char *cp, register const u_char *ep)
}
static const struct atNBPtuple *
-nbp_tuple_print(register const struct atNBPtuple *tp,
- register const u_char *ep,
- register u_short snet, register u_char snode,
- register u_char skt)
+nbp_tuple_print(const struct atNBPtuple *tp,
+ const u_char *ep,
+ u_short snet, u_char snode,
+ u_char skt)
{
- register const struct atNBPtuple *tpn;
+ const struct atNBPtuple *tpn;
if ((const u_char *)(tp + 1) > ep) {
fputs(tstr, stdout);
@@ -517,9 +517,9 @@ nbp_tuple_print(register const struct atNBPtuple *tp,
}
static const struct atNBPtuple *
-nbp_name_print(const struct atNBPtuple *tp, register const u_char *ep)
+nbp_name_print(const struct atNBPtuple *tp, const u_char *ep)
{
- register const char *cp = (const char *)tp + nbpTupleSize;
+ const char *cp = (const char *)tp + nbpTupleSize;
putchar(' ');
@@ -585,8 +585,8 @@ init_atalk(void)
static const char *
ataddr_string(u_short atnet, u_char athost)
{
- register struct hnamemem *tp, *tp2;
- register int i = (atnet << 8) | athost;
+ struct hnamemem *tp, *tp2;
+ int i = (atnet << 8) | athost;
char nambuf[HOST_NAME_MAX+1 + 20];
static int first = 1;
@@ -632,7 +632,7 @@ static struct tok skt2str[] = {
};
static const char *
-ddpskt_string(register int skt)
+ddpskt_string(int skt)
{
static char buf[12];
diff --git a/usr.sbin/tcpdump/print-bootp.c b/usr.sbin/tcpdump/print-bootp.c
index a130b0e3b79..2b97ba54cfd 100644
--- a/usr.sbin/tcpdump/print-bootp.c
+++ b/usr.sbin/tcpdump/print-bootp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-bootp.c,v 1.19 2015/01/16 06:40:21 deraadt Exp $ */
+/* $OpenBSD: print-bootp.c,v 1.20 2015/11/15 20:35:36 mmcc Exp $ */
/*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -50,10 +50,10 @@ static char tstr[] = " [|bootp]";
* Print bootp requests
*/
void
-bootp_print(register const u_char *cp, u_int length,
+bootp_print(const u_char *cp, u_int length,
u_short sport, u_short dport)
{
- register const struct bootp *bp;
+ const struct bootp *bp;
static u_char vm_cmu[4] = VM_CMU;
static u_char vm_rfc1048[4] = VM_RFC1048;
@@ -119,8 +119,8 @@ bootp_print(register const u_char *cp, u_int length,
/* Client's Ethernet address */
if (bp->bp_htype == 1 && bp->bp_hlen == 6) {
- register const struct ether_header *eh;
- register const char *e;
+ const struct ether_header *eh;
+ const char *e;
TCHECK2(bp->bp_chaddr[0], 6);
eh = (struct ether_header *)packetp;
@@ -262,12 +262,12 @@ static struct tok tag2str[] = {
};
static void
-rfc1048_print(register const u_char *bp, register u_int length)
+rfc1048_print(const u_char *bp, u_int length)
{
- register u_char tag;
- register u_int len, size;
- register const char *cp;
- register u_char c;
+ u_char tag;
+ u_int len, size;
+ const char *cp;
+ u_char c;
int first;
u_int32_t ul;
u_short us;
@@ -439,9 +439,9 @@ rfc1048_print(register const u_char *bp, register u_int length)
}
static void
-cmu_print(register const u_char *bp, register u_int length)
+cmu_print(const u_char *bp, u_int length)
{
- register const struct cmu_vend *cmu;
+ const struct cmu_vend *cmu;
static const char fmt[] = " %s:%s";
#define PRINTCMUADDR(m, s) { TCHECK(cmu->m); \
diff --git a/usr.sbin/tcpdump/print-carp.c b/usr.sbin/tcpdump/print-carp.c
index 2c02a73e76c..ac18eb7a598 100644
--- a/usr.sbin/tcpdump/print-carp.c
+++ b/usr.sbin/tcpdump/print-carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-carp.c,v 1.6 2009/10/27 23:59:55 deraadt Exp $ */
+/* $OpenBSD: print-carp.c,v 1.7 2015/11/15 20:35:36 mmcc Exp $ */
/*
* Copyright (c) 2000 William C. Fenner.
@@ -43,7 +43,7 @@
#include "addrtoname.h"
void
-carp_print(register const u_char *bp, register u_int len, int ttl)
+carp_print(const u_char *bp, u_int len, int ttl)
{
int version, type;
char *type_s;
diff --git a/usr.sbin/tcpdump/print-cnfp.c b/usr.sbin/tcpdump/print-cnfp.c
index 2a210aecd4b..d343a18b739 100644
--- a/usr.sbin/tcpdump/print-cnfp.c
+++ b/usr.sbin/tcpdump/print-cnfp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-cnfp.c,v 1.8 2008/10/22 10:05:55 gollo Exp $ */
+/* $OpenBSD: print-cnfp.c,v 1.9 2015/11/15 20:35:36 mmcc Exp $ */
/*
* Copyright (c) 1998 Michael Shalayeff
@@ -68,11 +68,11 @@ struct nfrec {
};
void
-cnfp_print(register const u_char *cp, u_int len, register const u_char *bp)
+cnfp_print(const u_char *cp, u_int len, const u_char *bp)
{
- register const struct nfhdr *nh;
- register const struct nfrec *nr;
- register const struct ip *ip;
+ const struct nfhdr *nh;
+ const struct nfrec *nr;
+ const struct ip *ip;
int nrecs, ver, proto;
time_t t;