From c04b51fb633e27e4b0c294718dae3ac179f6f671 Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Sat, 30 May 2009 17:12:48 +0000 Subject: 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 --- src/couchdb/couch_file.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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]). -- cgit v1.2.3