patacongo commented on issue #370: net: socket: Introduce net_clear_sinzero() URL: https://github.com/apache/incubator-nuttx/pull/370#issuecomment-590869227 > does it make sense that we call memset on the whole addr before call si_getpeername/si_getsockename/si_accept/si_recvfrom? I dislike that solution too. It is a ugly hack. We should do it right. sin_zerio is not different then any other field in sockadd_in. The clean, easily unstandable way is: addr->sin_port = AF_INET; addr->sin_addr.s_addr = addr; memset(addr->sin_zero, 0, sizeof(addr->sin_zero)); Let's not take ugly shortcuts.
---------------------------------------------------------------- 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
