elm_font: correct argument order for calloc()

calloc() expects count first and the actual size to allocate as second
argument. Say Thank You to smatch for finding this issues for us.
This commit is contained in:
Stefan Schmidt 2015-11-30 21:58:39 +01:00
parent 337c51c946
commit 8d92d32676
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ _elm_font_properties_get(Eina_Hash **font_hash,
/* get font name */
len = token - font;
name = calloc(sizeof(char), len + 1);
name = calloc(len + 1, sizeof(char));
if (!name) return NULL;
strncpy(name, font, len);
@ -68,7 +68,7 @@ _elm_font_properties_get(Eina_Hash **font_hash,
char *style_old = style;
len = substyle - style;
style = calloc(sizeof(char), len + 1);
style = calloc(len + 1, sizeof(char));
if (style)
{
strncpy(style, style_old, len);