mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-22 15:28:08 +00:00
[common] use variable-relative sizeof where possible
This commit is contained in:

committed by
Geoffrey McRae

parent
982b4e6625
commit
1c5620ba25
@@ -24,7 +24,7 @@
|
||||
|
||||
struct CountedBuffer * countedBufferNew(size_t size)
|
||||
{
|
||||
struct CountedBuffer * buffer = malloc(sizeof(struct CountedBuffer) + size);
|
||||
struct CountedBuffer * buffer = malloc(sizeof(*buffer) + size);
|
||||
if (!buffer)
|
||||
return NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user