diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-09-19 14:38:00 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-09-19 14:38:00 -0700 |
commit | e4bce92acb1567a6377995d8d688b95358ec29cf (patch) | |
tree | 9dd90fea7c6d635bd21c637fdc6c11dc3fb0b6dc /src/w32inevt.c | |
parent | 127342224ea0971d14077f9290d91064972c78ca (diff) |
* 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/w32inevt.c')
-rw-r--r-- | src/w32inevt.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/w32inevt.c b/src/w32inevt.c index ee07db5335..d4cc620335 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; } |