Skip to content

Commit

Permalink
last three dialyzer recommended cleanups
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791136 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jchris committed Jul 4, 2009
1 parent 6dec68c commit c25c1bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/couchdb/couch_btree.erl
Expand Up @@ -243,8 +243,9 @@ complete_root(Bt, KPs) ->
% written. Plus with the "case size(term_to_binary(InList)) of" code it's
% probably really inefficient.

chunkify(_Bt, []) ->
[];
% dialyzer says this pattern is never matched
% chunkify(_Bt, []) ->
% [];
chunkify(Bt, InList) ->
case size(term_to_binary(InList)) of
Size when Size > ?CHUNK_THRESHOLD ->
Expand Down
2 changes: 1 addition & 1 deletion src/couchdb/couch_key_tree.erl
Expand Up @@ -191,7 +191,7 @@ get_key_leafs_simple(Pos, [{Key, _Value, SubTree}=Tree | RestTree], KeysToGet, K
{LeafsFound ++ RestLeafsFound, KeysRemaining};
KeysToGet2 ->
LeafsFound = get_all_leafs_simple(Pos, [Tree], KeyPathAcc),
LeafKeysFound = [LeafKeyFound || {LeafKeyFound, _, _} <- LeafsFound],
LeafKeysFound = [LeafKeyFound || {LeafKeyFound, _} <- LeafsFound],
KeysToGet2 = KeysToGet2 -- LeafKeysFound,
{RestLeafsFound, KeysRemaining} = get_key_leafs_simple(Pos, RestTree, KeysToGet2, KeyPathAcc),
{LeafsFound ++ RestLeafsFound, KeysRemaining}
Expand Down
2 changes: 1 addition & 1 deletion src/couchdb/couch_view_updater.erl
Expand Up @@ -123,7 +123,7 @@ process_doc(Db, DocInfo, {Docs, #group{sig=Sig,name=GroupId,design_options=Desig
_ ->
exit(reset)
end;
{not_found, deleted} ->
{not_found, missing} ->
exit(reset)
end;
{false, <<?DESIGN_DOC_PREFIX, _/binary>>} -> % we skip design docs
Expand Down

0 comments on commit c25c1bd

Please sign in to comment.