From 11cf4e80748af05dd6c8f1d30609a5485bf28372 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 26 Nov 2016 19:26:23 +0100 Subject: fixup gcc warnings Remove following warning from common code: warning: ISO C90 forbids mixed declarations and code --- libc/sysdeps/linux/common/pselect.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libc/sysdeps/linux/common/pselect.c') diff --git a/libc/sysdeps/linux/common/pselect.c b/libc/sysdeps/linux/common/pselect.c index fbe85b780..bf2c08375 100644 --- a/libc/sysdeps/linux/common/pselect.c +++ b/libc/sysdeps/linux/common/pselect.c @@ -36,10 +36,6 @@ static int __NC(pselect)(int nfds, fd_set *readfds, fd_set *writefds, */ struct timespec _ts; - if (timeout != NULL) { - _ts = *timeout; - timeout = &_ts; - } /* Note: the system call expects 7 values but on most architectures we can only pass in 6 directly. If there is an architecture with support for more parameters a new version of this file needs to @@ -49,6 +45,11 @@ static int __NC(pselect)(int nfds, fd_set *readfds, fd_set *writefds, __kernel_size_t ss_len; } data; + if (timeout != NULL) { + _ts = *timeout; + timeout = &_ts; + } + if (sigmask != NULL) { data.ss = (__kernel_ulong_t) sigmask; data.ss_len = __SYSCALL_SIGSET_T_SIZE; -- cgit v1.2.3