Date: Wed, 2 Apr 1997 09:50:19 +0900 (JST) From: Michael Hancock <michaelh@cet.co.jp> To: FreeBSD Hackers <Hackers@FreeBSD.ORG> Subject: Bugs in libc_r (fwd) Message-ID: <Pine.SV4.3.95.970402094923.22946A-100000@parkplace.cet.co.jp>
next in thread | raw e-mail | index | archive | help
Some C precedence errors.
---------- Forwarded message ----------
Date: 01 Apr 1997 21:52:03 +0200
From: "Alex Fenyo (eowyn)" <fenyo@email.enst.fr>
To: freebsd-current@freebsd.org
Subject: Bugs in libc_r
Hello,
The same bug is repeated 4 times in libc_r. The problem is that
the operator '&' has a lower precedence than '==' in C, and the
author of the code forgot it at 4 places in the source :
in /usr/src/lib/libc_r/uthread/uthread_read.c :
------------------------------------------------------------
if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 &&
(errno == EWOULDBLOCK || errno == EAGAIN)) {
------------------------------------------------------------
should be replaced by :
------------------------------------------------------------
if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
(errno == EWOULDBLOCK || errno == EAGAIN)) {
------------------------------------------------------------
The same replacement should be done in :
uthread_readv.c, uthread_write.c, uthread_writev.c
Could someone apply the modifications ?
Alexandre Fenyo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.95.970402094923.22946A-100000>
