summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-11-14 10:57:45 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-11-14 10:57:45 +0000
commit1243cefd789dddc2e071079ef5252e46cb3f7c1d (patch)
treef904bfce92451f2ccf01f8ff139ec1681b0ea0dc
parent73742508fcd8e994450582c1b7296c709da66764 (diff)
downloadcygnal-1243cefd789dddc2e071079ef5252e46cb3f7c1d.tar.gz
cygnal-1243cefd789dddc2e071079ef5252e46cb3f7c1d.tar.bz2
cygnal-1243cefd789dddc2e071079ef5252e46cb3f7c1d.zip
* fhandler_termios.cc (fhandler_termios::line_edit): Fix fatal typo in
bytes_read pointer checks.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_termios.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0b7236729..c4be0562a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_termios.cc (fhandler_termios::line_edit): Fix fatal typo in
+ bytes_read pointer checks.
+
2014-11-13 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_termios::line_edit): Add parameter to return
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 50c95801d..1786e49c9 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -243,7 +243,7 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti,
bool sawsig = false;
int iscanon = ti.c_lflag & ICANON;
- if (*bytes_read)
+ if (bytes_read)
*bytes_read = nread;
while (nread-- > 0)
{
@@ -402,7 +402,7 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti,
}
/* Adding one compensates for the postdecrement in the above loop. */
- if (*bytes_read)
+ if (bytes_read)
*bytes_read -= (nread + 1);
if (sawsig)