aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-05-10 15:20:25 +0200
committerLukas Larsson <[email protected]>2012-05-30 18:21:07 +0200
commite20207c4e86cc2f0e58381a8a10c84aa6c067d12 (patch)
tree2debae6c2e1f9e5c982d7d9b0216dd442e912acf /lib/kernel
parent70f1e73d83877a22e3bee4b9e95d676ada7eb317 (diff)
downloadotp-e20207c4e86cc2f0e58381a8a10c84aa6c067d12.tar.gz
otp-e20207c4e86cc2f0e58381a8a10c84aa6c067d12.tar.bz2
otp-e20207c4e86cc2f0e58381a8a10c84aa6c067d12.zip
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 d8033ee192..cdb984c333 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -1258,7 +1258,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