summaryrefslogtreecommitdiff
path: root/src/modules/conf_keybindings
diff options
context:
space:
mode:
authorMaxime Villard <rustyBSD@gmx.fr>2012-12-21 21:31:13 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-21 21:31:13 +0000
commit4a52c4626891581ed55cdc3b3c1c604f4c7d4d17 (patch)
tree355e163a5c34fe318c5e698c80185da9c888f0cc /src/modules/conf_keybindings
parentd11c1cc6b146cd203aef67461ddbcc8eae85d1b2 (diff)
From: Maxime Villard <rustyBSD@gmx.fr>
Subject: [E-devel] [e][PATCH] Optimizations v2 Date: Fri, 21 Dec 2012 22:17:32 +0100 Hi, same patch as before: removed useless nullchecks and switched some free()'s to E_FREE(). SVN revision: 81592
Diffstat (limited to 'src/modules/conf_keybindings')
-rw-r--r--src/modules/conf_keybindings/e_int_config_keybindings.c6
-rw-r--r--src/modules/conf_keybindings/e_int_config_mousebindings.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/conf_keybindings/e_int_config_keybindings.c b/src/modules/conf_keybindings/e_int_config_keybindings.c
index 47f08c301..bb9dc9fcf 100644
--- a/src/modules/conf_keybindings/e_int_config_keybindings.c
+++ b/src/modules/conf_keybindings/e_int_config_keybindings.c
@@ -175,8 +175,8 @@ _free_data(E_Config_Dialog *cfd __UNUSED__,
175 eina_stringshare_del(cfdata->locals.binding); 175 eina_stringshare_del(cfdata->locals.binding);
176 eina_stringshare_del(cfdata->locals.action); 176 eina_stringshare_del(cfdata->locals.action);
177 177
178 if (cfdata->locals.params) free(cfdata->locals.params); 178 free(cfdata->locals.params);
179 if (cfdata->params) free(cfdata->params); 179 free(cfdata->params);
180 E_FREE(cfdata); 180 E_FREE(cfdata);
181} 181}
182 182
@@ -785,7 +785,7 @@ _update_action_list(E_Config_Dialog_Data *cfdata)
785 else 785 else
786 { 786 {
787 e_widget_ilist_unselect(cfdata->gui.o_action_list); 787 e_widget_ilist_unselect(cfdata->gui.o_action_list);
788 if (cfdata->locals.action) free(cfdata->locals.action); 788 free(cfdata->locals.action);
789 cfdata->locals.action = strdup(""); 789 cfdata->locals.action = strdup("");
790 e_widget_entry_clear(cfdata->gui.o_params); 790 e_widget_entry_clear(cfdata->gui.o_params);
791 } 791 }
diff --git a/src/modules/conf_keybindings/e_int_config_mousebindings.c b/src/modules/conf_keybindings/e_int_config_mousebindings.c
index d409ed82a..ba0125df4 100644
--- a/src/modules/conf_keybindings/e_int_config_mousebindings.c
+++ b/src/modules/conf_keybindings/e_int_config_mousebindings.c
@@ -191,7 +191,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
191 eina_stringshare_del(cfdata->locals.action); 191 eina_stringshare_del(cfdata->locals.action);
192 eina_stringshare_del(cfdata->locals.cur); 192 eina_stringshare_del(cfdata->locals.cur);
193 193
194 if (cfdata->locals.params) free(cfdata->locals.params); 194 free(cfdata->locals.params);
195 E_FREE(cfdata); 195 E_FREE(cfdata);
196} 196}
197 197
@@ -756,8 +756,8 @@ _update_mouse_binding_list(E_Config_Dialog_Data *cfdata)
756 snprintf(label, sizeof(label), "%s + %s", button ? button : "", mods); 756 snprintf(label, sizeof(label), "%s + %s", button ? button : "", mods);
757 else 757 else
758 snprintf(label, sizeof(label), "%s", button ? button : ""); 758 snprintf(label, sizeof(label), "%s", button ? button : "");
759 if (button) free(button); 759 free(button);
760 if (mods) free(mods); 760 free(mods);
761 761
762 switch (eb->button) 762 switch (eb->button)
763 { 763 {
@@ -817,8 +817,8 @@ _update_mouse_binding_list(E_Config_Dialog_Data *cfdata)
817 snprintf(label, sizeof(label), "%s + %s", button ? button : "", mods); 817 snprintf(label, sizeof(label), "%s + %s", button ? button : "", mods);
818 else 818 else
819 snprintf(label, sizeof(label), "%s", button ? button : ""); 819 snprintf(label, sizeof(label), "%s", button ? button : "");
820 if (button) free(button); 820 free(button);
821 if (mods) free(mods); 821 free(mods);
822 822
823 snprintf(val, sizeof(val), "w%d", i); 823 snprintf(val, sizeof(val), "w%d", i);
824 824