From 694e66e30d2439af5f1bd64f646d7d2e4a943c85 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 15 Nov 2014 19:40:45 +0100 Subject: [PATCH] wmaker: removed unnecessary variable 'done' in panelBtnCallback The variable is assigned a value that never change, so it adds extra complexity which is not good for code maintainability. It is probable that this was meant for cases that are handled in current code with early function return, which are better for code readability. Signed-off-by: Christophe CURIS Signed-off-by: Carlos R. Mafra --- src/dockedapp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dockedapp.c b/src/dockedapp.c index e7f0513d..6812ed1c 100644 --- a/src/dockedapp.c +++ b/src/dockedapp.c @@ -154,7 +154,6 @@ static void panelBtnCallback(WMWidget * self, void *data) WMButton *btn = self; AppSettingsPanel *panel = (AppSettingsPanel *) data; char *text; - int done = 1; if (panel->okBtn == btn) { text = WMGetTextFieldText(panel->iconField); @@ -215,8 +214,7 @@ static void panelBtnCallback(WMWidget * self, void *data) panel->editedIcon->lock = WMGetButtonSelected(panel->lockBtn); } - if (done) - DestroyDockAppSettingsPanel(panel); + DestroyDockAppSettingsPanel(panel); } #define PWIDTH 295