Commit f3d40610 authored by Mihai Moldovan's avatar Mihai Moldovan

nx-X11/programs/Xserver/os/connection.c: compact display autodetection code.

parent 1ccc6be6
......@@ -439,14 +439,12 @@ CreateWellKnownSockets(void)
}
else { /* -displayfd and no explicit display number */
Bool found = 0;
#ifdef NXAGENT_SERVER
int i_offset = 0;
#ifdef NXAGENT_SERVER
if (explicit_display)
i_offset = atoi(display);
for (i = i_offset; i < 65536 - X_TCP_PORT; i++) {
#else
for (i = 0; i < 65536 - X_TCP_PORT; i++) {
#endif /* NXAGENT_SERVER */
for (i = i_offset; i < 65536 - X_TCP_PORT; i++) {
if (TryCreateSocket(i, &partial) && !partial) {
found = 1;
break;
......
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