From 72445bb374d36f6655d7a5b4d0ac813d9415924a Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 27 Jul 2016 00:28:47 +0200 Subject: mod_http_upload_quota: Apply cosmetic changes Use "fun f/1" syntax in place of "fun(X) -> f(X) end". --- src/mod_http_upload_quota.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mod_http_upload_quota.erl') diff --git a/src/mod_http_upload_quota.erl b/src/mod_http_upload_quota.erl index 35e266dd..3051a4e8 100644 --- a/src/mod_http_upload_quota.erl +++ b/src/mod_http_upload_quota.erl @@ -251,7 +251,7 @@ terminate(Reason, #state{server_host = ServerHost, timers = Timers}) -> ?DEBUG("Stopping upload quota process for ~s: ~p", [ServerHost, Reason]), ejabberd_hooks:delete(http_upload_slot_request, ServerHost, ?MODULE, handle_slot_request, 50), - lists:foreach(fun(Timer) -> timer:cancel(Timer) end, Timers). + lists:foreach(fun timer:cancel/1, Timers). -spec code_change({down, _} | _, state(), _) -> {ok, state()}. @@ -299,7 +299,7 @@ enforce_quota(UserDir, SlotSize, _OldSize, MinSize, MaxSize) -> {[Path | AccFiles], AccSize + Size, NewSize} end, {[], 0, 0}, Files), if OldSize + SlotSize > MaxSize -> - lists:foreach(fun(File) -> del_file_and_dir(File) end, DelFiles), + lists:foreach(fun del_file_and_dir/1, DelFiles), file:del_dir(UserDir), % In case it's empty, now. NewSize + SlotSize; true -> @@ -314,7 +314,7 @@ delete_old_files(UserDir, CutOff) -> [] -> ok; OldFiles -> - lists:foreach(fun(File) -> del_file_and_dir(File) end, OldFiles), + lists:foreach(fun del_file_and_dir/1, OldFiles), file:del_dir(UserDir) % In case it's empty, now. end. -- cgit v1.2.3