]> git.eshelyaron.com Git - emacs.git/commitdiff
READ_BUF_SIZE → sizeof read_buf
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Jul 2025 15:46:24 +0000 (08:46 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 08:47:19 +0000 (10:47 +0200)
* 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)

src/fileio.c

index 7aa2113454b9384d33d69175aeb3e3feb0795653..4c3bc5787cfe9a8ba3490853cf6f0cf716e690c4 100644 (file)
@@ -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;