mirror of https://github.com/mpv-player/mpv
Use calloc instead of malloc+memset
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30586 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f452c1262f
commit
af356b5d15
|
@ -838,9 +838,8 @@ static font_desc_t* init_font_desc(void)
|
|||
font_desc_t *desc;
|
||||
int i;
|
||||
|
||||
desc = malloc(sizeof(font_desc_t));
|
||||
desc = calloc(1, sizeof(*desc));
|
||||
if(!desc) return NULL;
|
||||
memset(desc,0,sizeof(font_desc_t));
|
||||
|
||||
desc->dynamic = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue