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 | 21f0c4baabb162270791088d07312afaf4b96b5f (patch) | |
| tree | 719cf089b81e66b6e26d95a77666560861150337 | |
| parent | 1bec9a9b613e2a8f9d83a2429e6f6de44c306976 (diff) | |
| download | rabbitmq-server-git-21f0c4baabb162270791088d07312afaf4b96b5f.tar.gz | |
simplify, remove redundant code
| -rw-r--r-- | src/gm.erl | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gm.erl b/src/gm.erl index 098d84fa30..1703864afd 100644 --- a/src/gm.erl +++ b/src/gm.erl @@ -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; |
