patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero()
URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590863874
 
 
   Let me be clearer.  Whenever logic within the OS inializes a sockaddr_in 
structure, the code sequence should always be modified to set sin_zero() like:
   
       addr->sin_port = AF_INET;
       addr->sin_addr.s_addr = addr;
       memset(addr->sin_zero, 0, sizeof(addr->sin_zero));
   
   There should be no centralized logic to try to set sin_zero in some other 
place.
   
   If the sockaddr_in structure is not created by the OS, it must never modify 
it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to