I am working through some Static Analysis defects and one that is causing me an issue is this one.
SOCKADDR_IN m_stLclAddr;
SOCKADDR_IN is a member of the WinSock API
The defect is saying that I have not initialized the following:
- m_stLclAddr.sin_port
- m_stLclAddr.sin_zero
- m_stLclAddr.sin_addr
- m_stLclAddr.sin_family
I am not very familiar familiar with the WinSock API but I have done a bit of research and I just want to know if the following line of code would initialize m_stLclAddr with default values?:
m_stLclAddr = { 0 };