diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2011-01-11 15:45:39 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2011-01-11 15:45:39 +0000 |
| commit | d16c66f16fec99fe13f7769949b6472dec57e1b3 (patch) | |
| tree | b0a2922a078e9eafed9f23f1a46ac1e6a3befb25 /src | |
| parent | 27fe1d8bf9c554c9aecd667d8f23a965edcbc1d1 (diff) | |
| download | rabbitmq-server-git-d16c66f16fec99fe13f7769949b6472dec57e1b3.tar.gz | |
cosmetic and tiny refactor
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_msg_store.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index 1fe06a1f3a..ec458414b2 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -948,12 +948,12 @@ internal_sync(State = #msstate { current_file_handle = CurHdl, false -> [{CRef, Guids} | NS] end end, [], CTG), - if Syncs =:= [] andalso CGs =:= [] -> ok; - true -> file_handle_cache:sync(CurHdl) + case {Syncs, CGs} of + {[], []} -> ok; + _ -> file_handle_cache:sync(CurHdl) end, - lists:foreach(fun (K) -> K() end, lists:reverse(Syncs)), - [client_confirm(CRef, Guids, written, State1) - || {CRef, Guids} <- CGs], + [K() || K <- lists:reverse(Syncs)], + [client_confirm(CRef, Guids, written, State1) || {CRef, Guids} <- CGs], State1 #msstate { cref_to_guids = dict:new(), on_sync = [] }. |
