common: fix more glitches in IPv4 initialization
This commit is contained in:
parent
4b87548b71
commit
aa0721a90e
@ -753,7 +753,7 @@ connect_loopback(int sck, const char *port)
|
||||
}
|
||||
|
||||
// else IPv4
|
||||
g_memset(&sa, 0, sizeof(s));
|
||||
g_memset(&s, 0, sizeof(s));
|
||||
s.sin_family = AF_INET;
|
||||
s.sin_addr.s_addr = htonl(INADDR_LOOPBACK); // IPv4 127.0.0.1
|
||||
s.sin_port = htons((tui16)atoi(port));
|
||||
@ -944,7 +944,7 @@ g_tcp_bind(int sck, const char *port)
|
||||
errno6 = errno;
|
||||
|
||||
// else IPv4
|
||||
g_memset(&sa, 0, sizeof(s));
|
||||
g_memset(&s, 0, sizeof(s));
|
||||
s.sin_family = AF_INET;
|
||||
s.sin_addr.s_addr = htonl(INADDR_ANY); // IPv4 0.0.0.0
|
||||
s.sin_port = htons((tui16)atoi(port));
|
||||
|
Loading…
Reference in New Issue
Block a user