mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-11-27 03:38:22 +00:00
[common] use variable-relative sizeof where possible
This commit is contained in:
committed by
Geoffrey McRae
parent
982b4e6625
commit
1c5620ba25
@@ -39,7 +39,7 @@ struct LGEvent
|
||||
|
||||
LGEvent * lgCreateEvent(bool autoReset, unsigned int msSpinTime)
|
||||
{
|
||||
LGEvent * handle = (LGEvent *)calloc(sizeof(LGEvent), 1);
|
||||
LGEvent * handle = (LGEvent *)calloc(sizeof(*handle), 1);
|
||||
if (!handle)
|
||||
{
|
||||
DEBUG_ERROR("Failed to allocate memory");
|
||||
|
||||
Reference in New Issue
Block a user