summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkse/thread/thr_read.c')
-rw-r--r--lib/libkse/thread/thr_read.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libkse/thread/thr_read.c b/lib/libkse/thread/thr_read.c
index 504143d..242014e 100644
--- a/lib/libkse/thread/thr_read.c
+++ b/lib/libkse/thread/thr_read.c
@@ -29,6 +29,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $Id$
+ *
*/
#include <sys/types.h>
#include <sys/fcntl.h>
@@ -50,7 +52,7 @@ read(int fd, void *buf, size_t nbytes)
__FILE__, __LINE__)) == 0) {
/* Perform a non-blocking read syscall: */
while ((ret = _thread_sys_read(fd, buf, nbytes)) < 0) {
- if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 &&
+ if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
(errno == EWOULDBLOCK || errno == EAGAIN)) {
_thread_kern_sig_block(&status);
_thread_run->data.fd.fd = fd;
OpenPOWER on IntegriCloud