diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-01-17 15:43:53 +0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-02-07 15:49:08 +0200 |
commit | d7df0b41dc38327388c3f19fdf4246793d4a1e4b (patch) | |
tree | c22ae85e9673aab5ba4df10ee5c7e124f4cdac1b /slirp/ip_icmp.c | |
parent | a9d8b3ec4385793815d7121785730422fa3dfb68 (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/ip_icmp.c')
-rw-r--r-- | slirp/ip_icmp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c index 6b6344b776..7c5cb75ae5 100644 --- a/slirp/ip_icmp.c +++ b/slirp/ip_icmp.c @@ -240,7 +240,7 @@ end_error: #define ICMP_MAXDATALEN (IP_MSS-28) void -icmp_send_error(struct mbuf *msrc, u_char type, u_char code, int minsize, +icmp_send_error(struct mbuf *msrc, uint8_t type, uint8_t code, int minsize, const char *message) { unsigned hlen, shlen, s_ip_len; @@ -388,7 +388,7 @@ icmp_reflect(struct mbuf *m) * Strip out original options by copying rest of first * mbuf's data back, and adjust the IP length. */ - memmove((caddr_t)(ip + 1), (caddr_t)ip + hlen, + memmove((char *)(ip + 1), (char *)ip + hlen, (unsigned )(m->m_len - hlen)); hlen -= optlen; ip->ip_hl = hlen >> 2; @@ -412,7 +412,7 @@ void icmp_receive(struct socket *so) struct mbuf *m = so->so_m; struct ip *ip = mtod(m, struct ip *); int hlen = ip->ip_hl << 2; - u_char error_code; + uint8_t error_code; struct icmp *icp; int id, len; |