wIconChangeImageFile removed error variable

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) <kix@kix.es>
This commit is contained in:
Rodolfo García Peñas (kix) authored and Carlos R. Mafra committed 2013-10-01 08:40:05 +02:00
1 parent cc01ca5c6b
commit 6366aeef3a
1 file changed
+2 -5
+2 -5
View File
@@ -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)