From 2e64831fb6742d8fc4164000da9acae4738853a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Tue, 8 Oct 2013 00:56:45 +0200 Subject: [PATCH] Removed unused variable wapp_list MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The variable wapp_list is never set, then the comparison with wapp is only true if wapp is NULL. wapp can not be NULL in the function wApplicationDestroy() because is tested previously. Signed-off-by: Rodolfo García Peñas (kix) --- src/application.c | 19 +++++-------------- src/screen.h | 2 -- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/application.c b/src/application.c index a5063ba5..fe8fe6e7 100644 --- a/src/application.c +++ b/src/application.c @@ -143,10 +143,9 @@ WApplication *wApplicationCreate(WWindow * wwin) return wapp; } -void wApplicationDestroy(WApplication * wapp) +void wApplicationDestroy(WApplication *wapp) { WWindow *wwin; - WScreen *scr; if (!wapp) return; @@ -166,18 +165,10 @@ void wApplicationDestroy(WApplication * wapp) return; } - scr = wapp->main_window_desc->screen_ptr; - - if (wapp == scr->wapp_list) { - if (wapp->next) - wapp->next->prev = NULL; - scr->wapp_list = wapp->next; - } else { - if (wapp->next) - wapp->next->prev = wapp->prev; - if (wapp->prev) - wapp->prev->next = wapp->next; - } + if (wapp->next) + wapp->next->prev = wapp->prev; + if (wapp->prev) + wapp->prev->next = wapp->next; XDeleteContext(dpy, wapp->main_window, w_global.context.app_win); wAppMenuDestroy(wapp->menu); diff --git a/src/screen.h b/src/screen.h index ea1edccb..fc933f11 100644 --- a/src/screen.h +++ b/src/screen.h @@ -107,8 +107,6 @@ typedef struct _WScreen { WMArray *fakeGroupLeaders; /* list of fake window group ids */ - struct WApplication *wapp_list; /* list of all aplications */ - WMBag *stacking_list; /* bag of lists of windows * in stacking order. * Indexed by window level -- 2.11.4.GIT