forked from enlightenment/efl
why calloc (fill with 0's) then re-fill it again instantly.. except
the nul terminator? pointless. fix. SVN revision: 56145
This commit is contained in:
parent
e38d447210
commit
ef9a0591f1
|
@ -118,9 +118,9 @@ eina_unicode_strdup(const Eina_Unicode *text)
|
|||
size_t len;
|
||||
|
||||
len = eina_unicode_strlen(text);
|
||||
ustr = (Eina_Unicode *)calloc(len + 1, sizeof(Eina_Unicode));
|
||||
ustr = (Eina_Unicode *)malloc((len + 1) * sizeof(Eina_Unicode));
|
||||
memcpy(ustr, text, len * sizeof(Eina_Unicode));
|
||||
|
||||
ustr[len] = 0;
|
||||
return ustr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue