aboutsummaryrefslogtreecommitdiff
path: root/slirp/tcp_output.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-01-17 15:43:53 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-02-07 15:49:08 +0200
commitd7df0b41dc38327388c3f19fdf4246793d4a1e4b (patch)
treec22ae85e9673aab5ba4df10ee5c7e124f4cdac1b /slirp/tcp_output.c
parenta9d8b3ec4385793815d7121785730422fa3dfb68 (diff)
slirp: prefer c99 types over BSD kind
Replace: - u_char -> uint8_t - u_short -> uint16_t - u_long -> uint32_t - u_int -> unsigned - caddr_t -> char * Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/tcp_output.c')
-rw-r--r--slirp/tcp_output.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/slirp/tcp_output.c b/slirp/tcp_output.c
index 2b4335eb34..e9674df121 100644
--- a/slirp/tcp_output.c
+++ b/slirp/tcp_output.c
@@ -40,7 +40,7 @@
#include "slirp.h"
-static const u_char tcp_outflags[TCP_NSTATES] = {
+static const uint8_t tcp_outflags[TCP_NSTATES] = {
TH_RST|TH_ACK, 0, TH_SYN, TH_SYN|TH_ACK,
TH_ACK, TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK,
TH_FIN|TH_ACK, TH_ACK, TH_ACK,
@@ -63,7 +63,7 @@ tcp_output(struct tcpcb *tp)
register struct tcpiphdr *ti, tcpiph_save;
struct ip *ip;
struct ip6 *ip6;
- u_char opt[MAX_TCPOPTLEN];
+ uint8_t opt[MAX_TCPOPTLEN];
unsigned optlen, hdrlen;
int idle, sendalot;
@@ -271,7 +271,7 @@ send:
opt[0] = TCPOPT_MAXSEG;
opt[1] = 4;
mss = htons((uint16_t) tcp_mss(tp, 0));
- memcpy((caddr_t)(opt + 2), (caddr_t)&mss, sizeof(mss));
+ memcpy((char *)(opt + 2), (char *)&mss, sizeof(mss));
optlen = 4;
}
}
@@ -301,7 +301,7 @@ send:
m->m_data += IF_MAXLINKHDR;
m->m_len = hdrlen;
- sbcopy(&so->so_snd, off, (int) len, mtod(m, caddr_t) + hdrlen);
+ sbcopy(&so->so_snd, off, (int) len, mtod(m, char *) + hdrlen);
m->m_len += len;
/*
@@ -324,7 +324,7 @@ send:
ti = mtod(m, struct tcpiphdr *);
- memcpy((caddr_t)ti, &tp->t_template, sizeof (struct tcpiphdr));
+ memcpy((char *)ti, &tp->t_template, sizeof (struct tcpiphdr));
/*
* Fill in fields, remembering maximum advertised
@@ -353,7 +353,7 @@ send:
ti->ti_seq = htonl(tp->snd_max);
ti->ti_ack = htonl(tp->rcv_nxt);
if (optlen) {
- memcpy((caddr_t)(ti + 1), (caddr_t)opt, optlen);
+ memcpy((char *)(ti + 1), (char *)opt, optlen);
ti->ti_off = (sizeof (struct tcphdr) + optlen) >> 2;
}
ti->ti_flags = flags;