From 6366aeef3a9669cfc52614498042cf6e1eb36bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sat, 28 Sep 2013 15:33:53 +0200 Subject: [PATCH] wIconChangeImageFile removed error variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/icon.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/icon.c b/src/icon.c index c454049e..064b6890 100644 --- a/src/icon.c +++ b/src/icon.c @@ -356,7 +356,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) @@ -378,10 +377,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)