diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-03-28 18:05:40 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-03-28 18:05:40 +0100 |
| commit | 81508789e91cc2ca55f6786b98f0f18517070c69 (patch) | |
| tree | 5316d0bd08a1d32e3ace52b4098c22b8bd871be9 /src | |
| parent | d29143347e11f2326843bd2b6145e1fa99eff077 (diff) | |
| download | rabbitmq-server-git-81508789e91cc2ca55f6786b98f0f18517070c69.tar.gz | |
Cosmetic. I'm sure at some point Prev was used for something.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_binding.erl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_binding.erl b/src/rabbit_binding.erl index 4e85d08ef0..645b42fa04 100644 --- a/src/rabbit_binding.erl +++ b/src/rabbit_binding.erl @@ -445,11 +445,10 @@ serial(X) -> end. next_serial(#exchange{name = Name}) -> - Prev = case mnesia:read(rabbit_exchange_serial, Name, write) of - [] -> 0; - [#exchange_serial{serial = S}] -> S - end, - Serial = Prev + 1, + Serial = case mnesia:read(rabbit_exchange_serial, Name, write) of + [] -> 1; + [#exchange_serial{serial = S}] -> S + 1 + end, mnesia:write(rabbit_exchange_serial, #exchange_serial{name = Name, serial = Serial}, write), Serial. |
