From 3652dd179603eb2f8b7856273c84d9d4a797fd97 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sat, 24 Oct 2015 18:31:16 +0200 Subject: [PATCH] mod_http_upload_quota: Mark unused variables --- mod_http_upload/src/mod_http_upload_quota.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod_http_upload/src/mod_http_upload_quota.erl b/mod_http_upload/src/mod_http_upload_quota.erl index dbafa03..eee0230 100644 --- a/mod_http_upload/src/mod_http_upload_quota.erl +++ b/mod_http_upload/src/mod_http_upload_quota.erl @@ -246,7 +246,7 @@ handle_slot_request(Acc, _JID, _Path, _Size, _Lang) -> Acc. non_neg_integer()) -> non_neg_integer(). -enforce_quota(UserDir, SlotSize, OldSize, MinSize, MaxSize) +enforce_quota(_UserDir, SlotSize, OldSize, _MinSize, MaxSize) when is_integer(OldSize), OldSize + SlotSize =< MaxSize -> OldSize + SlotSize; enforce_quota(UserDir, SlotSize, _OldSize, MinSize, MaxSize) -> @@ -254,7 +254,7 @@ enforce_quota(UserDir, SlotSize, _OldSize, MinSize, MaxSize) -> TimeA > TimeB end, gather_file_info(UserDir)), {DelFiles, OldSize, NewSize} = - lists:foldl(fun({Path, Size, _Time}, {[], AccSize, AccSize}) + lists:foldl(fun({_Path, Size, _Time}, {[], AccSize, AccSize}) when AccSize + Size + SlotSize =< MinSize -> {[], AccSize + Size, AccSize + Size}; ({Path, Size, _Time}, {[], AccSize, AccSize}) ->