1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 21:38:00 +01:00

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.
This commit is contained in:
Rodolfo García Peñas (kix)
2013-03-20 04:02:14 +01:00
committed by Carlos R. Mafra
parent 066de301df
commit 53d31c7bbd

View File

@@ -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);