diff options
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/fileio.c b/src/fileio.c index fd5277cbd59..dd34872c263 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3264,7 +3264,7 @@ variable `last-coding-system-used' to the coding system actually used. */) platform that allows file sizes greater than the maximum off_t value. */ if (! not_regular && ! (0 <= st.st_size && st.st_size <= BUF_BYTES_MAX)) - error ("Maximum buffer size exceeded"); + buffer_overflow (); /* Prevent redisplay optimizations. */ current_buffer->clip_changed = 1; @@ -3800,16 +3800,7 @@ variable `last-coding-system-used' to the coding system actually used. */) } if (! not_regular) - { - register Lisp_Object temp; - - total = XINT (end) - XINT (beg); - - /* Make sure point-max won't overflow after this insertion. */ - XSETINT (temp, total); - if (total != XINT (temp)) - error ("Maximum buffer size exceeded"); - } + total = XINT (end) - XINT (beg); else /* For a special file, all we can do is guess. */ total = READ_BUF_SIZE; |