summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-04 14:17:55 +0000
committerTom Hacohen <tom@stosb.com>2016-03-04 14:17:55 +0000
commit912f03d6e2cc71b82676a0a73a1df4551eb1d7ab (patch)
tree6eda6ae0904d416c41abc9d872978efca6cccc3e
parentb5b843bcdec508a24726ff62524dc26d8c21ebf6 (diff)
downloadefl-912f03d6e2cc71b82676a0a73a1df4551eb1d7ab.tar.gz
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.
-rw-r--r--src/lib/eo/eo_base_class.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 665f684af4..0740b39163 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)
{