wmbiff: addr.sin_port is in NBO, so we should use ntohs(3), not htons(3).

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
Jeremy Sowden 2019-06-28 16:11:19 +01:00 committed by Carlos R. Mafra
parent 5d9eb1eb11
commit dfa571a21b

View file

@ -383,10 +383,10 @@ int test_sock_connect(void)
perror("listen");
return 1;
}
if (sock_connect("127.0.0.1", htons(addr.sin_port)) < 0) {
if (sock_connect("127.0.0.1", ntohs(addr.sin_port)) < 0) {
return 1;
}
if (sock_connect("localhost", htons(addr.sin_port)) < 0) {
if (sock_connect("localhost", ntohs(addr.sin_port)) < 0) {
return 1;
}
return 0;