diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2014-01-10 11:17:19 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2014-01-10 11:17:19 +0000 |
commit | 44226025176899ca5d681893527fe6b8e2735995 (patch) | |
tree | 719cf089b81e66b6e26d95a77666560861150337 | |
parent | 18f539584086962b35f3db0bc0d288fd5e1480c9 (diff) | |
download | rabbitmq-server-44226025176899ca5d681893527fe6b8e2735995.tar.gz |
simplify, remove redundant code
-rw-r--r-- | src/gm.erl | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -898,13 +898,10 @@ internal_broadcast(Msg, From, State = #state { self = Self, State1 = State #state { pub_count = PubCount1, confirms = Confirms1, broadcast_buffer = Buffer1 }, - case From =/= none of - true -> - handle_callback_result({Result, flush_broadcast_buffer(State1)}); - false -> - handle_callback_result( - {Result, State1 #state { broadcast_buffer = Buffer1 }}) - end. + handle_callback_result(case From of + none -> {Result, State1}; + _ -> {Result, flush_broadcast_buffer(State1)} + end). flush_broadcast_buffer(State = #state { broadcast_buffer = [] }) -> State; |