1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 23:22:30 +01:00

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)
2013-09-28 15:33:53 +02:00
committed by Carlos R. Mafra
parent cc01ca5c6b
commit 6366aeef3a

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)