[host] use variable-relative sizeof where possible

This commit is contained in:
Tudor Brindus
2021-08-15 12:18:01 -04:00
committed by Geoffrey McRae
parent c3f7327187
commit 982b4e6625
4 changed files with 10 additions and 10 deletions

View File

@@ -64,7 +64,7 @@ static const char * xcb_getName(void)
static bool xcb_create(CaptureGetPointerBuffer getPointerBufferFn, CapturePostPointerBuffer postPointerBufferFn)
{
DEBUG_ASSERT(!this);
this = (struct xcb *)calloc(sizeof(struct xcb), 1);
this = (struct xcb *)calloc(sizeof(*this), 1);
this->shmID = -1;
this->data = (void *)-1;
this->frameEvent = lgCreateEvent(true, 20);