[client] use variable-relative sizeof where possible

This commit is contained in:
Tudor Brindus
2021-08-15 12:18:22 -04:00
committed by Geoffrey McRae
parent 1c5620ba25
commit 14ad83c6b8
14 changed files with 25 additions and 25 deletions

View File

@@ -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))
{