summaryrefslogtreecommitdiff
path: root/smproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'smproxy.c')
-rw-r--r--smproxy.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/smproxy.c b/smproxy.c
index 6e32371..fb12cbf 100644
--- a/smproxy.c
+++ b/smproxy.c
@@ -98,7 +98,7 @@ HasSaveYourself(Window window)
{
Atom *protocols;
int numProtocols;
- int i, found;
+ int found;
protocols = NULL;
@@ -109,9 +109,10 @@ HasSaveYourself(Window window)
if (protocols != NULL)
{
- for (i = 0; i < numProtocols; i++)
+ for (int i = 0; i < numProtocols; i++) {
if (protocols[i] == wmSaveYourselfAtom)
found = 1;
+ }
XFree (protocols);
}
@@ -240,7 +241,6 @@ FinishSaveYourself(WinInfo *winInfo, Bool has_WM_SAVEYOURSELF)
{
SmProp prop1, prop2, prop3, *props[3];
SmPropValue prop1val, prop2val, prop3val;
- int i;
if (!winInfo->got_first_save_yourself)
{
@@ -299,7 +299,7 @@ FinishSaveYourself(WinInfo *winInfo, Bool has_WM_SAVEYOURSELF)
return;
}
- for (i = 0; i < winInfo->wm_command_count; i++)
+ for (int i = 0; i < winInfo->wm_command_count; i++)
{
prop1.vals[i].value = (SmPointer) winInfo->wm_command[i];
prop1.vals[i].length = strlen (winInfo->wm_command[i]);
@@ -884,7 +884,7 @@ ProxySaveYourselfPhase2CB(SmcConn smcConn, SmPointer clientData)
SmProp prop1, prop2, prop3, *props[3];
SmPropValue prop1val, prop2val, prop3val;
char *discardCommand;
- int numVals, i;
+ int numVals;
static int first_time = 1;
if (first_time)
@@ -943,7 +943,7 @@ ProxySaveYourselfPhase2CB(SmcConn smcConn, SmPointer clientData)
numVals = 0;
- for (i = 0; i < Argc; i++)
+ for (int i = 0; i < Argc; i++)
{
if (strcmp (Argv[i], "-clientId") == 0 ||
strcmp (Argv[i], "-restore") == 0)
@@ -1111,9 +1111,8 @@ ConnectProxyToSM(char *previous_id)
static void
CheckForExistingWindows(Window root)
{
- Window dontCare1, dontCare2, *children, client_window;
+ Window dontCare1, dontCare2, *children;
unsigned int nchildren, i;
- XCreateWindowEvent event;
/*
* We query the root tree for all windows created thus far.
@@ -1126,7 +1125,8 @@ CheckForExistingWindows(Window root)
for (i = 0; i < nchildren; i++)
{
- event.window = children[i];
+ Window client_window;
+ XCreateWindowEvent event = { .window = children[i] };
HandleCreate (&event);