* process.c (wait_reading_process_output): Omit incorrect test

of p->infd against zero.  Add easserts for infd having a plausible
value.
This commit is contained in:
Paul Eggert 2014-06-02 17:44:30 -07:00
parent cf3c1e2344
commit 827a3c3d8e
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
* process.c (wait_reading_process_output): Omit incorrect test
of p->infd against zero. Add easserts for infd having a plausible
value.
2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
Adjust to match recent lwlib changes.

View file

@ -4630,12 +4630,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
{
struct Lisp_Process *p =
XPROCESS (chan_process[channel]);
if (p && p->gnutls_p && p->gnutls_state && p->infd
if (p && p->gnutls_p && p->gnutls_state
&& ((emacs_gnutls_record_check_pending
(p->gnutls_state))
> 0))
{
nfds++;
eassert (p->infd == channel);
FD_SET (p->infd, &Available);
}
}
@ -4651,6 +4652,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
> 0))
{
nfds = 1;
eassert (0 <= wait_proc->infd
&& wait_proc->infd < FD_SETSIZE);
/* Set to Available. */
FD_SET (wait_proc->infd, &Available);
}