diff options
author | dim <dim@FreeBSD.org> | 2018-03-27 18:52:27 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2018-03-27 18:52:27 +0000 |
commit | 199ef8f96a0caadc29a4bdf121b8a5c9efcde207 (patch) | |
tree | 1fee1b1d9791450a6ef0eae0a81b154793de048c /sys/net/slcompress.c | |
parent | 54f770b796bd94590b148914cf8fb487a5e7d885 (diff) | |
download | FreeBSD-src-199ef8f96a0caadc29a4bdf121b8a5c9efcde207.zip FreeBSD-src-199ef8f96a0caadc29a4bdf121b8a5c9efcde207.tar.gz |
MFC r314568 (by emaste):
kern_sig.c: ANSIfy and remove archaic register keyword
Sponsored by: The FreeBSD Foundation
MFC r318389 (by emaste):
Remove register keyword from sys/ and ANSIfy prototypes
A long long time ago the register keyword told the compiler to store
the corresponding variable in a CPU register, but it is not relevant
for any compiler used in the FreeBSD world today.
ANSIfy related prototypes while here.
Reviewed by: cem, jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10193
Diffstat (limited to 'sys/net/slcompress.c')
-rw-r--r-- | sys/net/slcompress.c | 64 |
1 files changed, 25 insertions, 39 deletions
diff --git a/sys/net/slcompress.c b/sys/net/slcompress.c index 7d1bbb8..cd1ba9d 100644 --- a/sys/net/slcompress.c +++ b/sys/net/slcompress.c @@ -62,12 +62,10 @@ #define BCOPY(p1, p2, n) bcopy((void *)(p1), (void *)(p2), (int)(n)) void -sl_compress_init(comp, max_state) - struct slcompress *comp; - int max_state; +sl_compress_init(struct slcompress *comp, int max_state) { - register u_int i; - register struct cstate *tstate = comp->tstate; + u_int i; + struct cstate *tstate = comp->tstate; if (max_state == -1) { max_state = MAX_STATES - 1; @@ -154,20 +152,17 @@ sl_compress_init(comp, max_state) * if m is an M_PKTHDR mbuf. */ u_int -sl_compress_tcp(m, ip, comp, compress_cid) - struct mbuf *m; - register struct ip *ip; - struct slcompress *comp; - int compress_cid; +sl_compress_tcp(struct mbuf *m, struct ip *ip, struct slcompress *comp, + int compress_cid) { - register struct cstate *cs = comp->last_cs->cs_next; - register u_int hlen = ip->ip_hl; - register struct tcphdr *oth; - register struct tcphdr *th; - register u_int deltaS, deltaA; - register u_int changes = 0; + struct cstate *cs = comp->last_cs->cs_next; + u_int hlen = ip->ip_hl; + struct tcphdr *oth; + struct tcphdr *th; + u_int deltaS, deltaA; + u_int changes = 0; u_char new_seq[16]; - register u_char *cp = new_seq; + u_char *cp = new_seq; /* * Bail if this is an IP fragment or if the TCP packet isn't @@ -204,8 +199,8 @@ sl_compress_tcp(m, ip, comp, compress_cid) * states via linear search. If we don't find a state * for the datagram, the oldest state is (re-)used. */ - register struct cstate *lcs; - register struct cstate *lastcs = comp->last_cs; + struct cstate *lcs; + struct cstate *lastcs = comp->last_cs; do { lcs = cs; cs = cs->cs_next; @@ -414,11 +409,7 @@ uncompressed: int -sl_uncompress_tcp(bufp, len, type, comp) - u_char **bufp; - int len; - u_int type; - struct slcompress *comp; +sl_uncompress_tcp(u_char **bufp, int len, u_int type, struct slcompress *comp) { u_char *hdr, *cp; int hlen, vjlen; @@ -462,21 +453,16 @@ sl_uncompress_tcp(bufp, len, type, comp) * in *hdrp and its length in *hlenp. */ int -sl_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp) - u_char *buf; - int buflen, total_len; - u_int type; - struct slcompress *comp; - u_char **hdrp; - u_int *hlenp; +sl_uncompress_tcp_core(u_char *buf, int buflen, int total_len, u_int type, + struct slcompress *comp, u_char **hdrp, u_int *hlenp) { - register u_char *cp; - register u_int hlen, changes; - register struct tcphdr *th; - register struct cstate *cs; - register struct ip *ip; - register u_int16_t *bp; - register u_int vjlen; + u_char *cp; + u_int hlen, changes; + struct tcphdr *th; + struct cstate *cs; + struct ip *ip; + u_int16_t *bp; + u_int vjlen; switch (type) { @@ -544,7 +530,7 @@ sl_uncompress_tcp_core(buf, buflen, total_len, type, comp, hdrp, hlenp) switch (changes & SPECIALS_MASK) { case SPECIAL_I: { - register u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; + u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; th->th_ack = htonl(ntohl(th->th_ack) + i); th->th_seq = htonl(ntohl(th->th_seq) + i); } |