Add a fix for newer kernels - make sure to zero out the sock struct

This commit is contained in:
Ryan Pavlik
2010-10-08 16:56:56 -05:00
parent 6399dcd881
commit c5435f8d62

View File

@@ -170,6 +170,7 @@ int wiiuse_connect(struct wiimote_t** wm, int wiimotes) {
*/ */
static int wiiuse_connect_single(struct wiimote_t* wm, char* address) { static int wiiuse_connect_single(struct wiimote_t* wm, char* address) {
struct sockaddr_l2 addr; struct sockaddr_l2 addr;
memset(&addr, 0, sizeof (addr));
if (!wm || WIIMOTE_IS_CONNECTED(wm)) if (!wm || WIIMOTE_IS_CONNECTED(wm))
return 0; return 0;