[common] use variable-relative sizeof where possible
This commit is contained in:
1 parent
982b4e6625
commit
1c5620ba25
11 files changed
+21
-23
No files matched your search
@@ -43,7 +43,7 @@ static void * threadWrapper(void * opaque)
|
||||
|
||||
bool lgCreateThread(const char * name, LGThreadFunction function, void * opaque, LGThread ** handle)
|
||||
{
|
||||
*handle = (LGThread*)malloc(sizeof(LGThread));
|
||||
*handle = (LGThread*)malloc(sizeof(**handle));
|
||||
(*handle)->name = name;
|
||||
(*handle)->function = function;
|
||||
(*handle)->opaque = opaque;
|
||||
|
||||
Reference in new issue
Block a user