diff options
author | obrien <obrien@FreeBSD.org> | 2002-03-20 17:55:10 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-03-20 17:55:10 +0000 |
commit | 73c6870b18b8289171acd66d63bdd7ce8fb819b6 (patch) | |
tree | c6081460d17e593ae6ed744bc0f22972f9c9e461 /sbin/ping/ping.c | |
parent | b132efc524eb66518b26bf553bd07698212a0838 (diff) | |
download | FreeBSD-src-73c6870b18b8289171acd66d63bdd7ce8fb819b6.zip FreeBSD-src-73c6870b18b8289171acd66d63bdd7ce8fb819b6.tar.gz |
Remove 'register' keyword.
It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
"register" -- just how many free registers do people think machines have?)
Diffstat (limited to 'sbin/ping/ping.c')
-rw-r--r-- | sbin/ping/ping.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 064993d..502d210 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -201,7 +201,7 @@ main(argc, argv) struct hostent *hp; struct sockaddr_in *to, sin; struct termios ts; - register int i; + int i; int ch, hold, packlen, preload, sockerrno, almost_done = 0, ttl; struct in_addr ifaddr; unsigned char mttl, loop; @@ -639,7 +639,7 @@ main(argc, argv) } while (!finish_up) { - register int cc; + int cc; int n; struct timeval timeout, now; fd_set rfds; @@ -747,8 +747,8 @@ stopit(sig) static void pinger(void) { - register struct icmp *icp; - register int cc; + struct icmp *icp; + int cc; int i; icp = (struct icmp *)outpack; @@ -803,10 +803,10 @@ pr_pack(buf, cc, from, tv) struct sockaddr_in *from; struct timeval *tv; { - register struct icmp *icp; - register u_long l; - register int i, j; - register u_char *cp,*dp; + struct icmp *icp; + u_long l; + int i, j; + u_char *cp,*dp; static int old_rrlen; static char old_rr[MAX_IPOPTLEN]; struct ip *ip; @@ -1041,9 +1041,9 @@ in_cksum(addr, len) u_short *addr; int len; { - register int nleft = len; - register u_short *w = addr; - register int sum = 0; + int nleft = len; + u_short *w = addr; + int sum = 0; union { u_short us; u_char uc[2]; @@ -1081,7 +1081,7 @@ in_cksum(addr, len) */ static void tvsub(out, in) - register struct timeval *out, *in; + struct timeval *out, *in; { if ((out->tv_usec -= in->tv_usec) < 0) { --out->tv_sec; @@ -1406,7 +1406,7 @@ static void fill(bp, patp) char *bp, *patp; { - register int ii, jj, kk; + int ii, jj, kk; int pat[16]; char *cp; |