Commit 2f2a8ee0 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Init.c: some scope improvements

parent c6498ddb
...@@ -221,15 +221,6 @@ void checkX2goAgent(void) ...@@ -221,15 +221,6 @@ void checkX2goAgent(void)
void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
{ {
char *authority;
int i;
#ifdef __sun
char *environment;
#endif
/* /*
* Print our pid and version information. * Print our pid and version information.
*/ */
...@@ -295,11 +286,13 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) ...@@ -295,11 +286,13 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
} }
#endif #endif
if ((authority = getenv("NX_XAUTHORITY"))) char *authority = getenv("NX_XAUTHORITY");
if (authority)
{ {
#ifdef __sun #ifdef __sun
environment = malloc(15 + strlen(authority)); char *environment = malloc(15 + strlen(authority));
sprintf(environment, "XAUTHORITY=%s", authority); sprintf(environment, "XAUTHORITY=%s", authority);
...@@ -391,7 +384,7 @@ FIXME: These variables, if not removed at all because have probably ...@@ -391,7 +384,7 @@ FIXME: These variables, if not removed at all because have probably
nxagentNumScreens = 1; nxagentNumScreens = 1;
} }
for (i = 0; i < nxagentNumScreens; i++) for (int i = 0; i < nxagentNumScreens; i++)
{ {
AddScreen(nxagentOpenScreen, argc, argv); AddScreen(nxagentOpenScreen, argc, argv);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment