emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] pdumper 2298599: Use INT_MAX, not UINT_MAX, as limit for r


From: Daniel Colascione
Subject: [Emacs-diffs] pdumper 2298599: Use INT_MAX, not UINT_MAX, as limit for read()
Date: Mon, 19 Feb 2018 15:28:49 -0500 (EST)

branch: pdumper
commit 229859935f3c776bfa51b91c05302e8d124177d1
Author: Daniel Colascione <address@hidden>
Commit: Daniel Colascione <address@hidden>

    Use INT_MAX, not UINT_MAX, as limit for read()
---
 src/pdumper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pdumper.c b/src/pdumper.c
index f66f3fe..ec1af3c 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4885,7 +4885,7 @@ dump_read_all (int fd, void *buf, size_t bytes_to_read)
   while (bytes_read < bytes_to_read)
     {
       /* Some platforms accept only int-sized values to read.  */
-      unsigned chunk_to_read = UINT_MAX;
+      unsigned chunk_to_read = INT_MAX;
       if (bytes_to_read - bytes_read < chunk_to_read)
         chunk_to_read = (unsigned)(bytes_to_read - bytes_read);
       ssize_t chunk =



reply via email to

[Prev in Thread] Current Thread [Next in Thread]