[common] remove all casts around malloc

This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-08-16 16:26:58 +10:00
1 parent 81c38e825c
commit 2de9e3e9be
7 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -160,7 +160,7 @@ bool ivshmemInit(struct IVSHMEM * dev)
return false;
}
infData = (PSP_DEVICE_INTERFACE_DETAIL_DATA)calloc(1, reqSize);
infData = calloc(1, reqSize);
infData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
if (!SetupDiGetDeviceInterfaceDetail(devInfoSet, &devInterfaceData, infData, reqSize, NULL, NULL))
{
@@ -181,7 +181,7 @@ bool ivshmemInit(struct IVSHMEM * dev)
free(infData);
SetupDiDestroyDeviceInfoList(devInfoSet);
struct IVSHMEMInfo * info = (struct IVSHMEMInfo *)malloc(sizeof(*info));
struct IVSHMEMInfo * info = malloc(sizeof(*info));
info->handle = handle;
dev->opaque = info;
+1 -1
View File
@@ -44,7 +44,7 @@ static DWORD WINAPI threadWrapper(LPVOID lpParameter)
bool lgCreateThread(const char * name, LGThreadFunction function, void * opaque, LGThread ** handle)
{
*handle = (LGThread *)malloc(sizeof(**handle));
*handle = malloc(sizeof(**handle));
(*handle)->name = name;
(*handle)->function = function;
(*handle)->opaque = opaque;