tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=912f03d6e2cc71b82676a0a73a1df4551eb1d7ab

commit 912f03d6e2cc71b82676a0a73a1df4551eb1d7ab
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Mar 4 14:17:55 2016 +0000

    Eo legacy events: remove pointless string copies.
    
    This was there because the old code modified the string. It is no
    longer needed now that we just stringshare it.
---
 src/lib/eo/eo_base_class.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 665f684..0740b39 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -404,10 +404,7 @@ static Eina_Hash *_legacy_events_hash = NULL;
 EAPI const Eo_Event_Description *
 eo_base_legacy_only_event_description_get(const char *_event_name)
 {
-   char buf[1024];
-   strncpy(buf, _event_name, sizeof(buf) - 1);
-   buf[sizeof(buf) - 1] = '\0';
-   Eina_Stringshare *event_name = eina_stringshare_add(buf);
+   Eina_Stringshare *event_name = eina_stringshare_add(_event_name);
    Eo_Event_Description *event_desc = eina_hash_find(_legacy_events_hash, 
event_name);
    if (!event_desc)
      {

-- 


Reply via email to