aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index 0919a695f..a7338e49f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -221,15 +221,6 @@ void checkX2goAgent(void)
void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
{
- char *authority;
- int i;
-
- #ifdef __sun
-
- char *environment;
-
- #endif
-
/*
* Print our pid and version information.
*/
@@ -295,11 +286,13 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
}
#endif
- if ((authority = getenv("NX_XAUTHORITY")))
+ char *authority = getenv("NX_XAUTHORITY");
+
+ if (authority)
{
#ifdef __sun
- environment = malloc(15 + strlen(authority));
+ char *environment = malloc(15 + strlen(authority));
sprintf(environment, "XAUTHORITY=%s", authority);
@@ -391,7 +384,7 @@ FIXME: These variables, if not removed at all because have probably
nxagentNumScreens = 1;
}
- for (i = 0; i < nxagentNumScreens; i++)
+ for (int i = 0; i < nxagentNumScreens; i++)
{
AddScreen(nxagentOpenScreen, argc, argv);
}