diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-04-20 18:27:11 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-04-20 18:27:11 +0200 |
commit | f3d406109310404f14c9f489e89e70dfe8ed1119 (patch) | |
tree | e75eb911b13127ed303464e794bb8ad1873bb4b4 | |
parent | 1ccc6be6114044c5e56f7130c6e6b2836ef5b175 (diff) | |
download | nx-libs-f3d406109310404f14c9f489e89e70dfe8ed1119.tar.gz nx-libs-f3d406109310404f14c9f489e89e70dfe8ed1119.tar.bz2 nx-libs-f3d406109310404f14c9f489e89e70dfe8ed1119.zip |
nx-X11/programs/Xserver/os/connection.c: compact display autodetection code.
-rw-r--r-- | nx-X11/programs/Xserver/os/connection.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c index 1b01e1c46..c5ebeea1e 100644 --- a/nx-X11/programs/Xserver/os/connection.c +++ b/nx-X11/programs/Xserver/os/connection.c @@ -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; |