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 | aa2d322b045f14924f0cadb844ff681491ab54f8 (patch) | |
tree | b0a2922a078e9eafed9f23f1a46ac1e6a3befb25 /src | |
parent | 8b273beb6e40b0647e1ee8e532f57b4220785bd0 (diff) | |
download | rabbitmq-server-aa2d322b045f14924f0cadb844ff681491ab54f8.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 1fe06a1f..ec458414 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 = [] }. |