Skip to content

Commit

Permalink
cast malloc results
Browse files Browse the repository at this point in the history
  • Loading branch information
rpavlik committed Sep 7, 2011
1 parent 93fe0d8 commit 56aba3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) {

/* get the size of the data block required */
i = SetupDiGetDeviceInterfaceDetail(device_info, &device_data, NULL, 0, &len, NULL);
detail_data = malloc(len);
detail_data = (SP_DEVICE_INTERFACE_DETAIL_DATA_A*)malloc(len);
detail_data->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);

/* query the data for this device */
Expand Down

0 comments on commit 56aba3f

Please sign in to comment.