From 71b414062b06bf30438b5833b3dce9f70c3ce98b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 15 Apr 2011 03:23:56 -0700 Subject: [PATCH] * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT. --- src/ChangeLog | 2 ++ src/sysdep.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 200c20fc3bf..a088c1b42d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-15 Paul Eggert + * 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. diff --git a/src/sysdep.c b/src/sysdep.c index 6b6e3e9e791..e01bc4b1fbc 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -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); -- 2.39.2