aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-05-30 18:29:19 +0200
committerLukas Larsson <[email protected]>2012-05-30 18:29:19 +0200
commitecb81c21bfa0d822493412b7a0d2a6738ca7261a (patch)
treeefdfde0ccbcd58033c812caf5d42a9a622f8877d /lib/kernel
parent8341e29bbc5fb0c979beb8e3f60665cff19a241f (diff)
parent283cf3bbce1b31bfd9ef1cc82adaa23eb736a97f (diff)
downloadotp-ecb81c21bfa0d822493412b7a0d2a6738ca7261a.tar.gz
otp-ecb81c21bfa0d822493412b7a0d2a6738ca7261a.tar.bz2
otp-ecb81c21bfa0d822493412b7a0d2a6738ca7261a.zip
Merge branch 'maint'
* maint: Fix chunk usage check
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/file.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index 33252d0a6f..22af38c598 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -1276,7 +1276,7 @@ sendfile_fallback_int(File, Sock, Bytes, ChunkSize, BytesSent)
when Bytes > BytesSent; Bytes == 0 ->
Size = if Bytes == 0 ->
ChunkSize;
- (Bytes - BytesSent + ChunkSize) > 0 ->
+ (Bytes - BytesSent) < ChunkSize ->
Bytes - BytesSent;
true ->
ChunkSize