[erlang-patches] [PATCH] erts: change SENDFILE_CHUNK_SIZE from signed to unsigned

Jovi Zhang bookjovi@REDACTED
Tue Dec 6 07:50:29 CET 2011


>From 918d76da1a8becd231bea92cbc26358dd5363ddf Mon Sep 17 00:00:00 2001
From: Jovi Zhang <bookjovi@REDACTED>
Date: Tue, 29 Nov 2011 02:04:04 +0800
Subject: [PATCH] erts: change SENDFILE_CHUNK_SIZE from signed to unsigned

It's reasonable to use UL in SENDFILE_CHUNK_SIZE
---
erts/emulator/drivers/unix/unix_efile.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/erts/emulator/drivers/unix/unix_efile.c
b/erts/emulator/drivers/unix/unix_efile.c
index 7291164..eb2c5f5 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -1469,7 +1469,7 @@ efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset,
}

#ifdef HAVE_SENDFILE
-#define SENDFILE_CHUNK_SIZE ((1 << 30) -1)
+#define SENDFILE_CHUNK_SIZE ((1UL << 30) -1)

/*
 * sendfile: The implementation of the sendfile system call varies
--
1.7.2.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-erts-change-SENDFILE_CHUNK_SIZE-from-signed-to-unsig.patch
Type: application/octet-stream
Size: 879 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20111206/ceff7562/attachment.obj>


More information about the erlang-patches mailing list