summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-09-19 14:38:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-09-19 14:38:00 -0700
commite4bce92acb1567a6377995d8d688b95358ec29cf (patch)
tree9dd90fea7c6d635bd21c637fdc6c11dc3fb0b6dc /src
parent127342224ea0971d14077f9290d91064972c78ca (diff)
downloademacs-e4bce92acb1567a6377995d8d688b95358ec29cf.tar.gz
* w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
Ignore 'expected'. See Eli Zaretskii in <http://bugs.gnu.org/12471#8> (last line).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/w32inevt.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 42e7f6e87a3..e8827c2de18 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
+ * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
+ Ignore 'expected'. See Eli Zaretskii in
+ <http://bugs.gnu.org/12471#8> (last line).
+
* frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
(XParseGeometry): Now static. Substitute extremal values for
values that are out of range.
diff --git a/src/w32inevt.c b/src/w32inevt.c
index ee07db5335b..d4cc620335c 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -747,7 +747,7 @@ w32_console_read_socket (struct terminal *terminal,
int expected,
struct input_event *hold_quit)
{
- int nev, ret = 0, add;
+ int nev, add;
int isdead;
if (interrupt_input_blocked)
@@ -767,8 +767,7 @@ w32_console_read_socket (struct terminal *terminal,
/* If nev == -1, there was some kind of error
If nev == 0 then waitp must be zero and no events were available
so return. */
- UNBLOCK_INPUT;
- return nev;
+ break;
}
while (nev > 0)
@@ -812,9 +811,6 @@ w32_console_read_socket (struct terminal *terminal,
queue_ptr++;
nev--;
}
-
- if (ret > 0 || expected == 0)
- break;
}
/* We don't get told about changes in the window size (only the buffer
@@ -824,5 +820,5 @@ w32_console_read_socket (struct terminal *terminal,
maybe_generate_resize_event ();
UNBLOCK_INPUT;
- return ret;
+ return nev;
}