This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
RE: fhandler_tty_slave::tcflush() in fhandler_tty.cc
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin-patches at cygwin dot com>
- Date: Fri, 5 Aug 2005 15:17:02 +0100
- Subject: RE: fhandler_tty_slave::tcflush() in fhandler_tty.cc
----Original Message----
>From: Vaclav Haisman
>Sent: 05 August 2005 14:01
> fhandler_tty_slave::tcflush() is IMHO still wrong. The result of
> comparison is bool and bool converted to int is either 1 or 0. The
> following patch should cure it.
Just to enlarge upon that, the problem is not just that it's returning a
zero-or-one when it should be returning a zero-or-minus-one result, but that
the logical sense is inverted too: when flushing input, the test means that
it used to return zero for failure and non-zero for success. Your patch
looks good to me.
cheers,
DaveK
--
Can't think of a witty .sigline today....