Skip to content

Commit

Permalink
common: fix more glitches in IPv4 initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
metalefty committed Jul 14, 2017
1 parent 4b87548 commit aa0721a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/os_calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit aa0721a

Please sign in to comment.