From: Paul Eggert Date: Sun, 13 Jul 2025 16:35:38 +0000 (-0700) Subject: int → ptrdiff_t for read results X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b36b12887dfa9757054bc2f3e7a43857f015c0c6;p=emacs.git int → ptrdiff_t for read results * src/fileio.c (Finsert_file_contents): Use ptrdiff_t, not int, to store results returned by emacs_fd_read, which return ptrdiff_t. This doesn’t fix any bugs since the values happen to fit in int, but is a bit clearer and may simplify future changes. (cherry picked from commit 8ac78986ff7028c249f136b3523dacf0693c22d3) --- diff --git a/src/fileio.c b/src/fileio.c index bd8528af235..8150f4d8e12 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4501,7 +4501,7 @@ by calling `format-decode', which see. */) while (!giveup_match_end) { - int total_read, nread, bufpos, trial; + ptrdiff_t total_read, nread, bufpos, trial; off_t curpos; /* At what file position are we now scanning? */