aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/unit/unit1305.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c
index db0a44c5f..b958d0434 100644
--- a/tests/unit/unit1305.c
+++ b/tests/unit/unit1305.c
@@ -76,9 +76,6 @@ static void unit_stop(void)
static Curl_addrinfo *fake_ai(void)
{
static Curl_addrinfo *ai;
- int ss_size;
-
- ss_size = sizeof(struct sockaddr_in);
ai = calloc(1, sizeof(Curl_addrinfo));
if(!ai)
@@ -90,7 +87,7 @@ static Curl_addrinfo *fake_ai(void)
return NULL;
}
- ai->ai_addr = calloc(1, ss_size);
+ ai->ai_addr = calloc(1, sizeof(struct sockaddr_in));
if(!ai->ai_addr) {
free(ai->ai_canonname);
free(ai);
@@ -98,7 +95,7 @@ static Curl_addrinfo *fake_ai(void)
}
ai->ai_family = AF_INET;
- ai->ai_addrlen = ss_size;
+ ai->ai_addrlen = sizeof(struct sockaddr_in);
return ai;
}