cast malloc results
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user