From d8b5986dd6a718d948b9ea0e2da3256ac45bff42 Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Thu, 29 Aug 2002 23:06:07 +0000 Subject: Remove much of the dereferencing of the fd table entries to look at file flags and replace it with functions that will avoid null pointer checks. MFC to be done by archie ;-) PR: 42100 Reviewed by: archie, robert MFC after: 3 days --- lib/libpthread/thread/thr_exit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libpthread/thread/thr_exit.c') diff --git a/lib/libpthread/thread/thr_exit.c b/lib/libpthread/thread/thr_exit.c index fd90e29590773..8af1c1f90da75 100644 --- a/lib/libpthread/thread/thr_exit.c +++ b/lib/libpthread/thread/thr_exit.c @@ -69,7 +69,7 @@ void _exit(int status) for (i = 0; i < _thread_dtablesize; i++) { /* Check if this file descriptor is in use: */ if (_thread_fd_table[i] != NULL && - !(_thread_fd_table[i]->flags & O_NONBLOCK)) { + (_thread_fd_getflags(i) & O_NONBLOCK) == 0) { /* Get the current flags: */ flags = __sys_fcntl(i, F_GETFL, NULL); /* Clear the nonblocking file descriptor flag: */ -- cgit v1.2.3