summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-10 11:50:05 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-10 11:50:05 +0200
commit351b285030ab96d94c2f4a2b7a01a64ae266a2a2 (patch)
tree67007e118797537a2504dec86ccdeec09bbee2fe
parent783b3154cd7b4dbc3fea453dac5f7af09a011ef4 (diff)
downloadedoors-351b285030ab96d94c2f4a2b7a01a64ae266a2a2.zip
edoors-351b285030ab96d94c2f4a2b7a01a64ae266a2a2.tar.gz
edoors_particle_split_dst: fix action replace optimisation
-rw-r--r--src/lib/edoors_particle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/edoors_particle.c b/src/lib/edoors_particle.c
index 468cd5b..f1155be 100644
--- a/src/lib/edoors_particle.c
+++ b/src/lib/edoors_particle.c
@@ -136,9 +136,9 @@ EAPI void edoors_particle_split_dst(Edoors_Particle *particle)
tmp = sep+sizeof(char);
/* action defined */
if(particle->cur_action) {
- if(strcmp(particle->cur_action,tmp)!=0) {
- eina_stringshare_del(particle->cur_action);
- particle->cur_action = eina_stringshare_add(tmp);
+ n = strlen(tmp);
+ if( eina_stringshare_strlen(particle->cur_action)!=n || strncmp(particle->cur_action,tmp,n)!=0) {
+ eina_stringshare_replace(&particle->cur_action,tmp);
}
/* else : keep the same stringshare */
} else {