diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-07-27 00:28:47 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-07-27 00:28:47 +0200 |
commit | 72445bb374d36f6655d7a5b4d0ac813d9415924a (patch) | |
tree | 11b951aef0faad61e978c94fc773adee2e0309d3 /src/mod_http_upload_quota.erl | |
parent | Add 'allow_subscription' MUC configuration option (diff) |
mod_http_upload_quota: Apply cosmetic changes
Use "fun f/1" syntax in place of "fun(X) -> f(X) end".
Diffstat (limited to 'src/mod_http_upload_quota.erl')
-rw-r--r-- | src/mod_http_upload_quota.erl | 6 |
1 files changed, 3 insertions, 3 deletions
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. |