mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 00:28:20 +00:00
[host] remove all casts around malloc
This commit is contained in:
parent
2de9e3e9be
commit
4ecf749f7e
@ -64,7 +64,7 @@ static const char * xcb_getName(void)
|
|||||||
static bool xcb_create(CaptureGetPointerBuffer getPointerBufferFn, CapturePostPointerBuffer postPointerBufferFn)
|
static bool xcb_create(CaptureGetPointerBuffer getPointerBufferFn, CapturePostPointerBuffer postPointerBufferFn)
|
||||||
{
|
{
|
||||||
DEBUG_ASSERT(!this);
|
DEBUG_ASSERT(!this);
|
||||||
this = (struct xcb *)calloc(1, sizeof(*this));
|
this = calloc(1, sizeof(*this));
|
||||||
this->shmID = -1;
|
this->shmID = -1;
|
||||||
this->data = (void *)-1;
|
this->data = (void *)-1;
|
||||||
this->frameEvent = lgCreateEvent(true, 20);
|
this->frameEvent = lgCreateEvent(true, 20);
|
||||||
|
@ -153,7 +153,7 @@ static bool nvfbc_create(
|
|||||||
if (!NvFBCInit())
|
if (!NvFBCInit())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this = (struct iface *)calloc(1, sizeof(*this));
|
this = calloc(1, sizeof(*this));
|
||||||
|
|
||||||
this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor");
|
this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor");
|
||||||
this->getPointerBufferFn = getPointerBufferFn;
|
this->getPointerBufferFn = getPointerBufferFn;
|
||||||
@ -176,7 +176,7 @@ static bool nvfbc_init(void)
|
|||||||
GetEnvironmentVariable("NVFBC_PRIV_DATA", buffer, bufferLen);
|
GetEnvironmentVariable("NVFBC_PRIV_DATA", buffer, bufferLen);
|
||||||
|
|
||||||
privDataLen = (bufferLen - 1) / 2;
|
privDataLen = (bufferLen - 1) / 2;
|
||||||
privData = (uint8_t *)malloc(privDataLen);
|
privData = malloc(privDataLen);
|
||||||
char hex[3] = {0};
|
char hex[3] = {0};
|
||||||
for (int i = 0; i < privDataLen; ++i)
|
for (int i = 0; i < privDataLen; ++i)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user