Skip to content

Commit

Permalink
unix_netsocket.c: Fix comparison value
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 authored Mar 13, 2024
1 parent 20db196 commit 7f68245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix/unix_netsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ int plat_netsocket_connect(SOCKET socket, const char* hostname, unsigned short p
sock_addr.sin_addr.s_addr = inet_addr(hostname);
sock_addr.sin_port = htons(port);

if (sock_addr.sin_addr.s_addr == INADDR_ANY || sock_addr.sin_addr.s_addr == 0) {
if (sock_addr.sin_addr.s_addr == ((in_addr_t)-1) || sock_addr.sin_addr.s_addr == 0) {
struct hostent *hp;

hp = gethostbyname(hostname);
Expand Down

0 comments on commit 7f68245

Please sign in to comment.