This patch removes the error variable, because is not changed
after their initialization.

This patch also removes the if check to wfree the path variable,
because this variable never is NULL.

Signed-off-by: Rodolfo García Peñas (kix) <[email protected]>
---
 src/icon.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/icon.c b/src/icon.c
index fdfea00..b78fb40 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -358,7 +358,6 @@ int wIconChangeImageFile(WIcon *icon, const char *file)
        WScreen *scr = icon->core->screen_ptr;
        char *path;
        RImage *image = NULL;
-       int error = 0;
 
        /* If no new image, don't do nothing */
        if (!file)
@@ -380,10 +379,8 @@ int wIconChangeImageFile(WIcon *icon, const char *file)
        icon->file = wstrdup(path);
        update_icon_pixmap(icon);
 
-       if (path)
-               wfree(path);
-
-       return !error;
+       wfree(path);
+       return 1;
 }
 
 static char *get_name_for_wwin(WWindow *wwin)
-- 
1.8.4.rc3


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

Reply via email to