* sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.

This commit is contained in:
Paul Eggert 2011-04-15 03:23:56 -07:00
parent 9c3c56a747
commit 71b414062b
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,7 @@
2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
* sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
emacs_write: Accept and return EMACS_INT for sizes.
See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
et seq.

View file

@ -1844,7 +1844,10 @@ emacs_read (int fildes, char *buf, EMACS_INT nbyte)
{
register ssize_t rtnval;
while ((rtnval = read (fildes, buf, min (nbyte, MAX_RW_COUNT))) == -1
/* There is no need to check against MAX_RW_COUNT, since no caller ever
passes a size that large to emacs_read. */
while ((rtnval = read (fildes, buf, nbyte)) == -1
&& (errno == EINTR))
QUIT;
return (rtnval);