summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-01-16 01:14:29 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-01-16 01:14:29 +0000
commit9a3c897c8ee9a24a8e517c6c6f1f38f109c6722e (patch)
treee1b91e279632536068a915564d55dd91fb5ce6f4
parent4f31a3db2af4870fa4a371efacd25135b7e2de11 (diff)
why calloc (fill with 0's) then re-fill it again instantly.. except
the nul terminator? pointless. fix. SVN revision: 56145
-rw-r--r--src/lib/eina_unicode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eina_unicode.c b/src/lib/eina_unicode.c
index 79eccd3..c9e679c 100644
--- a/src/lib/eina_unicode.c
+++ b/src/lib/eina_unicode.c
@@ -118,9 +118,9 @@ eina_unicode_strdup(const Eina_Unicode *text)
118 size_t len; 118 size_t len;
119 119
120 len = eina_unicode_strlen(text); 120 len = eina_unicode_strlen(text);
121 ustr = (Eina_Unicode *)calloc(len + 1, sizeof(Eina_Unicode)); 121 ustr = (Eina_Unicode *)malloc((len + 1) * sizeof(Eina_Unicode));
122 memcpy(ustr, text, len * sizeof(Eina_Unicode)); 122 memcpy(ustr, text, len * sizeof(Eina_Unicode));
123 123 ustr[len] = 0;
124 return ustr; 124 return ustr;
125} 125}
126 126