From 53d31c7bbd7e97129b0d96d48c85e161c2d1b087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 20 Mar 2013 04:02:14 +0100 Subject: [PATCH] Removed dead code in wSessionRestoreState The function wSessionRestoreState() calls execCommand() with the argument "host", but this argument is never used, so we can remove the argument and the code to make that argument, dead code at wSessionRestoreState. --- src/session.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/session.c b/src/session.c index 703b5fa7..4fd11f89 100644 --- a/src/session.c +++ b/src/session.c @@ -328,7 +328,7 @@ void wSessionClearState(WScreen * scr) WMRemoveFromPLDictionary(scr->session_state, sWorkspace); } -static pid_t execCommand(WScreen * scr, char *command, char *host) +static pid_t execCommand(WScreen *scr, char *command) { pid_t pid; char **argv; @@ -411,10 +411,10 @@ static WSavedState *getWindowState(WScreen * scr, WMPropList * win_state) #define SAME(x, y) (((x) && (y) && !strcmp((x), (y))) || (!(x) && !(y))) -void wSessionRestoreState(WScreen * scr) +void wSessionRestoreState(WScreen *scr) { WSavedState *state; - char *instance, *class, *command, *host; + char *instance, *class, *command; WMPropList *win_info, *apps, *cmd, *value; pid_t pid; int i, count; @@ -454,12 +454,6 @@ void wSessionRestoreState(WScreen * scr) if (!instance && !class) continue; - value = WMGetFromPLDictionary(win_info, sHost); - if (value && WMIsPLString(value)) - host = WMGetFromPLString(value); - else - host = NULL; - state = getWindowState(scr, win_info); dock = NULL; @@ -499,7 +493,7 @@ void wSessionRestoreState(WScreen * scr) if (found) { wDockLaunchWithState(dock, btn, state); - } else if ((pid = execCommand(scr, command, host)) > 0) { + } else if ((pid = execCommand(scr, command)) > 0) { wWindowAddSavedState(instance, class, command, pid, state); } else { wfree(state);