aboutsummaryrefslogtreecommitdiff
path: root/slirp/slirp.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/slirp.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/slirp.c')
-rw-r--r--slirp/slirp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 730b78255c..3304c83001 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -46,7 +46,7 @@ static const uint8_t special_ethaddr[ETH_ALEN] = {
0x52, 0x55, 0x00, 0x00, 0x00, 0x00
};
-u_int curtime;
+unsigned curtime;
static QTAILQ_HEAD(, Slirp) slirp_instances =
QTAILQ_HEAD_INITIALIZER(slirp_instances);
@@ -55,9 +55,9 @@ static struct in_addr dns_addr;
#ifndef _WIN32
static struct in6_addr dns6_addr;
#endif
-static u_int dns_addr_time;
+static unsigned dns_addr_time;
#ifndef _WIN32
-static u_int dns6_addr_time;
+static unsigned dns6_addr_time;
#endif
#define TIMEOUT_FAST 2 /* milliseconds */
@@ -92,7 +92,7 @@ int get_dns_addr(struct in_addr *pdns_addr)
}
if ((ret = GetNetworkParams(FixedInfo, &BufLen)) != ERROR_SUCCESS) {
- printf("GetNetworkParams failed. ret = %08x\n", (u_int)ret );
+ printf("GetNetworkParams failed. ret = %08x\n", (unsigned)ret );
if (FixedInfo) {
GlobalFree(FixedInfo);
FixedInfo = NULL;
@@ -126,7 +126,7 @@ static void winsock_cleanup(void)
static int get_dns_addr_cached(void *pdns_addr, void *cached_addr,
socklen_t addrlen,
- struct stat *cached_stat, u_int *cached_time)
+ struct stat *cached_stat, unsigned *cached_time)
{
struct stat old_stat;
if (curtime - *cached_time < TIMEOUT_DEFAULT) {
@@ -149,7 +149,7 @@ static int get_dns_addr_cached(void *pdns_addr, void *cached_addr,
static int get_dns_addr_resolv_conf(int af, void *pdns_addr, void *cached_addr,
socklen_t addrlen, uint32_t *scope_id,
- u_int *cached_time)
+ unsigned *cached_time)
{
char buff[512];
char buff2[257];