summaryrefslogtreecommitdiff
path: root/src
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 /src
parentb5b843bcdec508a24726ff62524dc26d8c21ebf6 (diff)
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.
Diffstat (limited to 'src')
-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 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;
404EAPI const Eo_Event_Description * 404EAPI const Eo_Event_Description *
405eo_base_legacy_only_event_description_get(const char *_event_name) 405eo_base_legacy_only_event_description_get(const char *_event_name)
406{ 406{
407 char buf[1024]; 407 Eina_Stringshare *event_name = eina_stringshare_add(_event_name);
408 strncpy(buf, _event_name, sizeof(buf) - 1);
409 buf[sizeof(buf) - 1] = '\0';
410 Eina_Stringshare *event_name = eina_stringshare_add(buf);
411 Eo_Event_Description *event_desc = eina_hash_find(_legacy_events_hash, event_name); 408 Eo_Event_Description *event_desc = eina_hash_find(_legacy_events_hash, event_name);
412 if (!event_desc) 409 if (!event_desc)
413 { 410 {