summaryrefslogtreecommitdiff
path: root/legacy/eet/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-08-09 11:03:22 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-08-09 11:03:22 +0000
commitaddf4cccd05a31cffb06427eb970f484c3dbfec6 (patch)
tree5c2054bfa7804467137275df8ccb52064a809b95 /legacy/eet/src
parente905f3ccd2b684b41834e7bdc916679ea5af77b1 (diff)
eet: don't copy string around.
SVN revision: 75040
Diffstat (limited to 'legacy/eet/src')
-rw-r--r--legacy/eet/src/lib/eet_data.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/legacy/eet/src/lib/eet_data.c b/legacy/eet/src/lib/eet_data.c
index 4093740215..0b8537cb95 100644
--- a/legacy/eet/src/lib/eet_data.c
+++ b/legacy/eet/src/lib/eet_data.c
@@ -110,7 +110,7 @@ struct _Eet_Data_Group_Type_Codec
110 110
111struct _Eet_Data_Chunk 111struct _Eet_Data_Chunk
112{ 112{
113 char *name; 113 const char *name;
114 int len; 114 int len;
115 int size; 115 int size;
116 int hash; 116 int hash;
@@ -1422,7 +1422,7 @@ eet_data_chunk_new(void *data,
1422 || type == EET_T_F8P24) 1422 || type == EET_T_F8P24)
1423 type = EET_T_DOUBLE; 1423 type = EET_T_DOUBLE;
1424 1424
1425 chnk->name = strdup(name); 1425 chnk->name = name;
1426 chnk->len = strlen(name) + 1; 1426 chnk->len = strlen(name) + 1;
1427 chnk->size = size; 1427 chnk->size = size;
1428 chnk->data = data; 1428 chnk->data = data;
@@ -1434,9 +1434,6 @@ eet_data_chunk_new(void *data,
1434static inline void 1434static inline void
1435eet_data_chunk_free(Eet_Data_Chunk *chnk) 1435eet_data_chunk_free(Eet_Data_Chunk *chnk)
1436{ 1436{
1437 if (chnk->name)
1438 free(chnk->name);
1439
1440 free(chnk); 1437 free(chnk);
1441} 1438}
1442 1439
@@ -1624,7 +1621,7 @@ _eet_descriptor_hash_free(Eet_Data_Descriptor *edd)
1624 1621
1625static Eet_Data_Element * 1622static Eet_Data_Element *
1626_eet_descriptor_hash_find(Eet_Data_Descriptor *edd, 1623_eet_descriptor_hash_find(Eet_Data_Descriptor *edd,
1627 char *name, 1624 const char *name,
1628 int hash) 1625 int hash)
1629{ 1626{
1630 Eet_Data_Descriptor_Hash *bucket; 1627 Eet_Data_Descriptor_Hash *bucket;