summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2009-05-30 17:12:48 +0000
committerDamien F. Katz <damien@apache.org>2009-05-30 17:12:48 +0000
commitc04b51fb633e27e4b0c294718dae3ac179f6f671 (patch)
treee20e7d9543538ca4f39d8559420450ae579f4eb4 /src
parent347e33c608623197bb35c6c63f1e1ce53d5615a2 (diff)
Fix for couch_file bug found with etap test suite
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@780300 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_file.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl
index c773be98..2021bf5b 100644
--- a/src/couchdb/couch_file.erl
+++ b/src/couchdb/couch_file.erl
@@ -468,7 +468,7 @@ make_blocks(BlockOffset, IoList) ->
case split_iolist(IoList, (?SIZE_BLOCK - BlockOffset), []) of
{Begin, End} ->
[Begin | make_blocks(0, End)];
- _Size ->
+ _SplitRemaining ->
IoList
end.
@@ -485,8 +485,8 @@ split_iolist([Sublist| Rest], SplitAt, BeginAcc) when is_list(Sublist) ->
case split_iolist(Sublist, SplitAt, BeginAcc) of
{Begin, End} ->
{Begin, [End | Rest]};
- Len ->
- split_iolist(Rest, SplitAt - Len, [Sublist | BeginAcc])
+ SplitRemaining ->
+ split_iolist(Rest, SplitAt - (SplitAt - SplitRemaining), [Sublist | BeginAcc])
end;
split_iolist([Byte | Rest], SplitAt, BeginAcc) when is_integer(Byte) ->
split_iolist(Rest, SplitAt - 1, [Byte | BeginAcc]).