engine: common: net_ws: fix uninitialized family in IPSocket

This commit is contained in:
Alibek Omarov 2022-12-02 21:21:53 +03:00
parent cbe3e608b6
commit e97310c441
1 changed files with 1 additions and 3 deletions

View File

@ -1674,12 +1674,10 @@ static int NET_IPSocket( const char *net_iface, int port, int family )
int err, net_socket;
uint optval = 1;
dword _true = 1;
int pfamily;
int pfamily = PF_INET;
if( family == AF_INET6 )
pfamily = PF_INET6;
else if( family == AF_INET )
pfamily = PF_INET;
if( NET_IsSocketError(( net_socket = socket( pfamily, SOCK_DGRAM, IPPROTO_UDP ))))
{