aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-09-01 15:41:03 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:10:05 +0200
commit2f2a8ee008e2f90c4791eaeec6c86b42919cf9f7 (patch)
tree6ec95ecbd4c857c50aa52395df72c8f5032f44b2 /nx-X11/programs/Xserver/hw
parentc6498ddb7ef193cc9f9606fef77af5e239005e80 (diff)
downloadnx-libs-2f2a8ee008e2f90c4791eaeec6c86b42919cf9f7.tar.gz
nx-libs-2f2a8ee008e2f90c4791eaeec6c86b42919cf9f7.tar.bz2
nx-libs-2f2a8ee008e2f90c4791eaeec6c86b42919cf9f7.zip
Init.c: some scope improvements
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-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);
}