lib1960: fix test failure

On platforms where struct sockaddr has a length field, the current code
leaves it uninitialized, resulting in a test failure when valgrind is
used.

Closes #21377
This commit is contained in:
Dag-Erling Smørgrav 2026-04-19 18:09:29 +02:00 committed by Viktor Szakats
parent ebed4aaf01
commit 6506693f0b
No known key found for this signature in database

View file

@ -100,6 +100,7 @@ static CURLcode test_lib1960(const char *URL)
goto test_cleanup;
}
memset(&serv_addr, 0, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons((unsigned short)port);