From: Paul Eggert Date: Sun, 13 Jul 2025 15:46:24 +0000 (-0700) Subject: READ_BUF_SIZE → sizeof read_buf X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e5ef348968f9cccef21f83b940c0ffad2ebe31d;p=emacs.git READ_BUF_SIZE → sizeof read_buf * src/fileio.c (Finsert_file_contents): Minor refactoring. This should help future patches which distinguish read_buf’s size from other uses of READ_BUF_SIZE which may change. (cherry picked from commit ae30a61c74215c3e02fb3c0d603894457a4cfef5) --- diff --git a/src/fileio.c b/src/fileio.c index 7aa2113454b..4c3bc5787cf 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4616,11 +4616,11 @@ by calling `format-decode', which see. */) while (true) { - /* Read at most READ_BUF_SIZE bytes at a time, to allow + /* Read one buffer a time, to allow quitting while reading a huge file. */ this = emacs_fd_read (fd, read_buf + unprocessed, - READ_BUF_SIZE - unprocessed); + sizeof read_buf - unprocessed); if (this <= 0) break;