mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-16 20:38:16 +00:00
[client] use variable-relative sizeof where possible
This commit is contained in:

committed by
Geoffrey McRae

parent
1c5620ba25
commit
14ad83c6b8
@@ -51,14 +51,14 @@ struct EGL_Splash
|
||||
|
||||
bool egl_splashInit(EGL_Splash ** splash)
|
||||
{
|
||||
*splash = (EGL_Splash *)malloc(sizeof(EGL_Splash));
|
||||
*splash = (EGL_Splash *)malloc(sizeof(**splash));
|
||||
if (!*splash)
|
||||
{
|
||||
DEBUG_ERROR("Failed to malloc EGL_Splash");
|
||||
return false;
|
||||
}
|
||||
|
||||
memset(*splash, 0, sizeof(EGL_Splash));
|
||||
memset(*splash, 0, sizeof(**splash));
|
||||
|
||||
if (!egl_shaderInit(&(*splash)->bgShader))
|
||||
{
|
||||
|
Reference in New Issue
Block a user