From: Christophe CURIS <[email protected]>

The function wIconChooserDialog already makes sure that it returns
NULL if its result would have been an empty string, so it is not
necessary to re-check this in setIconCallback, this leads to
more complicated code and can't be optimised by the compiler.

Signed-off-by: Christophe CURIS <[email protected]>
---
 src/appicon.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/appicon.c b/src/appicon.c
index bbf1455..4d4d81e 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -535,10 +535,6 @@ static void setIconCallback(WMenu *menu, WMenuEntry *entry)
        result = wIconChooserDialog(scr, &file, icon->wm_instance, 
icon->wm_class);
 
        if (result && !icon->destroyed) {
-               if (file && *file == 0) {
-                       wfree(file);
-                       file = NULL;
-               }
                if (!wIconChangeImageFile(icon->icon, file)) {
                        wMessageDialog(scr, _("Error"),
                                       _("Could not open specified icon file"), 
_("OK"), NULL, NULL);
-- 
1.9.2


-- 
To unsubscribe, send mail to [email protected].

Reply via email to