summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2015-12-03 11:02:16 +0300
committerMichael Klishin <michael@clojurewerkz.org>2015-12-03 11:02:16 +0300
commitd6365c9342002283c30e542cc9e9b6f6e54ea8cf (patch)
tree95d175ab7f48eaf009ed45cc0457ea90d9511827 /src
parent829890be2a664a00205a3cbf04cdf00e18b022a0 (diff)
downloadrabbitmq-server-git-d6365c9342002283c30e542cc9e9b6f6e54ea8cf.tar.gz
Re-indent with Emacs
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_resource_monitor_misc.erl22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/rabbit_resource_monitor_misc.erl b/src/rabbit_resource_monitor_misc.erl
index 0994fffc51..2d8da2bb58 100644
--- a/src/rabbit_resource_monitor_misc.erl
+++ b/src/rabbit_resource_monitor_misc.erl
@@ -22,7 +22,7 @@
-ifdef(use_spec).
-spec(parse_information_unit/1 :: (integer() | string()) ->
- {ok, integer()} | {error, parse_error}).
+ {ok, integer()} | {error, parse_error}).
-endif.
@@ -32,18 +32,18 @@ parse_information_unit(MemLim) when is_list(MemLim) ->
"^(?<VAL>[0-9]+)(?<UNIT>kB|MB|GB|kiB|MiB|GiB|k|M|G)?$",
[{capture, all_names, list}]) of
{match, [[], _]} ->
- {ok, list_to_integer(MemLim)};
+ {ok, list_to_integer(MemLim)};
{match, [Unit, Num]} ->
Multiplier = case Unit of
- KiB when KiB == "k"; KiB == "kiB" -> 1024;
- MiB when MiB == "M"; MiB == "MiB" -> 1024*1024;
- GiB when GiB == "G"; GiB == "GiB" -> 1024*1024*1024;
- "KB" -> 1000;
- "MB" -> 1000000;
- "GB" -> 1000000000
- end,
+ KiB when KiB == "k"; KiB == "kiB" -> 1024;
+ MiB when MiB == "M"; MiB == "MiB" -> 1024*1024;
+ GiB when GiB == "G"; GiB == "GiB" -> 1024*1024*1024;
+ "KB" -> 1000;
+ "MB" -> 1000000;
+ "GB" -> 1000000000
+ end,
{ok, Num * Multiplier};
nomatch ->
- % log error
+ % log error
{error, parse_error}
- end. \ No newline at end of file
+ end.