diff options
author | Micael Karlberg <[email protected]> | 2012-01-23 14:10:54 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-01-23 14:10:54 +0100 |
commit | d01767b8145982659bb24cd101ec097a9566e4b4 (patch) | |
tree | 72000239d903e3da2ac1bbb96127e18dd36777fd /erts | |
parent | 87f506ebc6d0caca687b5cd67a844db2a8f8f7b1 (diff) | |
parent | 7e6ac31a0c918f42e747628db8fec610f5bd424c (diff) | |
download | otp-d01767b8145982659bb24cd101ec097a9566e4b4.tar.gz otp-d01767b8145982659bb24cd101ec097a9566e4b4.tar.bz2 otp-d01767b8145982659bb24cd101ec097a9566e4b4.zip |
Merge branch 'maint'
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/drivers/unix/unix_efile.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index e7dd9d2bdb..796843a735 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -1406,10 +1406,9 @@ efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset, } #ifdef HAVE_SENDFILE - // For some reason the maximum size_t cannot be used as the max size // 3GB seems to work on all platforms -#define SENDFILE_CHUNK_SIZE ((1 << 30) -1) +#define SENDFILE_CHUNK_SIZE ((1UL << 30) -1) /* * sendfile: The implementation of the sendfile system call varies @@ -1446,7 +1445,7 @@ efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd, written += retval; *nbytes -= retval; } - } while (retval != -1 && retval == SENDFILE_CHUNK_SIZE); + } while (retval == SENDFILE_CHUNK_SIZE); *nbytes = written; return check_error(retval == -1 ? -1 : 0, errInfo); #elif defined(__sun) && defined(__SVR4) && defined(HAVE_SENDFILEV) |