From ef9a0591f1441ed02b912cd9aa61fbc23ccd1d2c Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 16 Jan 2011 01:14:29 +0000 Subject: [PATCH] why calloc (fill with 0's) then re-fill it again instantly.. except the nul terminator? pointless. fix. SVN revision: 56145 --- legacy/eina/src/lib/eina_unicode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/eina/src/lib/eina_unicode.c b/legacy/eina/src/lib/eina_unicode.c index 79eccd332a..c9e679c71d 100644 --- a/legacy/eina/src/lib/eina_unicode.c +++ b/legacy/eina/src/lib/eina_unicode.c @@ -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; }