diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-02-05 23:56:08 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 14:57:21 +0200 |
commit | f3473e38ca4b4132303cb76e06fe06889ae5c131 (patch) | |
tree | 3541f7b3f2f09af9847afca35b362509b10cc1e5 /nx-X11/lib | |
parent | 52a458282a50bf54b54eacf071a15a26ab6e8547 (diff) | |
download | nx-libs-f3473e38ca4b4132303cb76e06fe06889ae5c131.tar.gz nx-libs-f3473e38ca4b4132303cb76e06fe06889ae5c131.tar.bz2 nx-libs-f3473e38ca4b4132303cb76e06fe06889ae5c131.zip |
XlibInt.c: scope improvements/reformat
Diffstat (limited to 'nx-X11/lib')
-rw-r--r-- | nx-X11/lib/src/XlibInt.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/nx-X11/lib/src/XlibInt.c b/nx-X11/lib/src/XlibInt.c index 5a481c9ab..bd97ed0bc 100644 --- a/nx-X11/lib/src/XlibInt.c +++ b/nx-X11/lib/src/XlibInt.c @@ -263,28 +263,22 @@ int _XSelect(int maxfds, fd_set *readfds, fd_set *writefds, fd_set t_readfds, t_writefds; struct timeval t_timeout; - int n, r, e; - #ifdef NX_TRANS_TEST - if (exceptfds != NULL) { fprintf(stderr, "_XSelect: WARNING! Can't handle exception fds in select.\n"); } - #endif if (readfds == NULL) { FD_ZERO(&t_readfds); - readfds = &t_readfds; } if (writefds == NULL) { FD_ZERO(&t_writefds); - writefds = &t_writefds; } @@ -292,11 +286,10 @@ int _XSelect(int maxfds, fd_set *readfds, fd_set *writefds, { t_timeout.tv_sec = 10; t_timeout.tv_usec = 0; - timeout = &t_timeout; } - n = maxfds; + int n = maxfds; /* * If the transport is gone avoid @@ -305,17 +298,17 @@ int _XSelect(int maxfds, fd_set *readfds, fd_set *writefds, if (NXTransPrepare(&n, readfds, writefds, timeout) != 0) { - NXTransSelect(&r, &e, &n, readfds, writefds, timeout); + int r, e; - NXTransExecute(&r, &e, &n, readfds, writefds, timeout); + NXTransSelect(&r, &e, &n, readfds, writefds, timeout); + NXTransExecute(&r, &e, &n, readfds, writefds, timeout); + errno = e; - errno = e; - - return r; + return r; } else { - return 0; + return 0; } } else |