diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-09-30 17:59:28 +0100 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-09-30 17:59:28 +0100 |
| commit | e1c21592a5bd33e6189b8ef71b9cf678e89a29d6 (patch) | |
| tree | 29aec72c4ba8ef2696f08a1cc2fc6791d5c81adb | |
| parent | e6cfdebe34120a934b284ddba47db7e53c48a4fa (diff) | |
| download | rabbitmq-server-git-e1c21592a5bd33e6189b8ef71b9cf678e89a29d6.tar.gz | |
cosmetic refactoring
| -rw-r--r-- | src/rabbit_msg_store.erl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index ef973d8a63..aa779e61ae 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -586,20 +586,20 @@ count_msg_refs(Gen, Seed, State) -> finished -> ok; {_MsgId, 0, Next} -> count_msg_refs(Gen, Next, State); {MsgId, Delta, Next} -> - case index_lookup(MsgId, State) of - not_found -> - ok = index_insert(#msg_location { msg_id = MsgId, + ok = case index_lookup(MsgId, State) of + not_found -> + index_insert(#msg_location { msg_id = MsgId, ref_count = Delta }, State); - StoreEntry = #msg_location { ref_count = RefCount } -> - NewRefCount = RefCount + Delta, - case NewRefCount of - 0 -> ok = index_delete(MsgId, State); - _ -> ok = index_update(StoreEntry #msg_location { + StoreEntry = #msg_location { ref_count = RefCount } -> + NewRefCount = RefCount + Delta, + case NewRefCount of + 0 -> index_delete(MsgId, State); + _ -> index_update(StoreEntry #msg_location { ref_count = NewRefCount }, State) - end - end, + end + end, count_msg_refs(Gen, Next, State) end. |
