summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-10-19 01:29:19 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-10-19 01:29:19 +0000
commit279937a6b9d9838e98260f1946485d4acd78acc1 (patch)
tree85807c224f775f277bd8b697362884600b783d06
parent26024088829a36698c57bf0b05dfc34f42adfc54 (diff)
eina: backport r78209.
SVN revision: 78210
-rw-r--r--ChangeLog6
-rw-r--r--src/lib/eina_stringshare.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 67c027e..2c85cbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -345,4 +345,8 @@
345 * Fix return value of eina_mmap_safety_enabled_set() and 345 * Fix return value of eina_mmap_safety_enabled_set() and
346 ensure future eina_mmap_safety_enabled_get() return right value 346 ensure future eina_mmap_safety_enabled_get() return right value
347 on success. 347 on success.
348 348
3492012-10-19 Patryk Kaczmarek
350
351 * eina_stringshare_add_length return NULL when func args are wrong.
352
diff --git a/src/lib/eina_stringshare.c b/src/lib/eina_stringshare.c
index 0e64214..6d236c5 100644
--- a/src/lib/eina_stringshare.c
+++ b/src/lib/eina_stringshare.c
@@ -612,7 +612,7 @@ EAPI Eina_Stringshare *
612eina_stringshare_add_length(const char *str, unsigned int slen) 612eina_stringshare_add_length(const char *str, unsigned int slen)
613{ 613{
614 if ((!str) || (slen <= 0)) 614 if ((!str) || (slen <= 0))
615 return ""; 615 return NULL;
616 else if (slen == 1) 616 else if (slen == 1)
617 return (Eina_Stringshare *) _eina_stringshare_single + ((*str) << 1); 617 return (Eina_Stringshare *) _eina_stringshare_single + ((*str) << 1);
618 else if (slen < 4) 618 else if (slen < 4)