mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-22 03:38:10 +00:00
[host] use correct argument order for calloc
This commit is contained in:
parent
104141eec1
commit
cdda89cef7
4 changed files with 5 additions and 5 deletions
|
@ -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(sizeof(*this), 1);
|
this = (struct xcb *)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);
|
||||||
|
|
|
@ -170,7 +170,7 @@ static void dxgi_initOptions(void)
|
||||||
static bool dxgi_create(CaptureGetPointerBuffer getPointerBufferFn, CapturePostPointerBuffer postPointerBufferFn)
|
static bool dxgi_create(CaptureGetPointerBuffer getPointerBufferFn, CapturePostPointerBuffer postPointerBufferFn)
|
||||||
{
|
{
|
||||||
DEBUG_ASSERT(!this);
|
DEBUG_ASSERT(!this);
|
||||||
this = calloc(sizeof(*this), 1);
|
this = calloc(1, sizeof(*this));
|
||||||
if (!this)
|
if (!this)
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("failed to allocate iface struct");
|
DEBUG_ERROR("failed to allocate iface struct");
|
||||||
|
@ -190,7 +190,7 @@ static bool dxgi_create(CaptureGetPointerBuffer getPointerBufferFn, CapturePostP
|
||||||
this->maxTextures = 1;
|
this->maxTextures = 1;
|
||||||
|
|
||||||
this->useAcquireLock = option_get_bool("dxgi", "useAcquireLock");
|
this->useAcquireLock = option_get_bool("dxgi", "useAcquireLock");
|
||||||
this->texture = calloc(sizeof(*this->texture), this->maxTextures);
|
this->texture = calloc(this->maxTextures, sizeof(*this->texture));
|
||||||
this->getPointerBufferFn = getPointerBufferFn;
|
this->getPointerBufferFn = getPointerBufferFn;
|
||||||
this->postPointerBufferFn = postPointerBufferFn;
|
this->postPointerBufferFn = postPointerBufferFn;
|
||||||
this->avgMapTime = runningavg_new(10);
|
this->avgMapTime = runningavg_new(10);
|
||||||
|
|
|
@ -153,7 +153,7 @@ static bool nvfbc_create(
|
||||||
if (!NvFBCInit())
|
if (!NvFBCInit())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this = (struct iface *)calloc(sizeof(*this), 1);
|
this = (struct iface *)calloc(1, sizeof(*this));
|
||||||
|
|
||||||
this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor");
|
this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor");
|
||||||
this->getPointerBufferFn = getPointerBufferFn;
|
this->getPointerBufferFn = getPointerBufferFn;
|
||||||
|
|
|
@ -133,7 +133,7 @@ bool NvFBCToSysCreate(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*handle = (NvFBCHandle)calloc(sizeof(**handle), 1);
|
*handle = (NvFBCHandle)calloc(1, sizeof(**handle));
|
||||||
(*handle)->nvfbc = static_cast<NvFBCToSys *>(params.pNvFBC);
|
(*handle)->nvfbc = static_cast<NvFBCToSys *>(params.pNvFBC);
|
||||||
|
|
||||||
if (maxWidth)
|
if (maxWidth)
|
||||||
|
|
Loading…
Reference in a new issue