summaryrefslogtreecommitdiff
path: root/src/vm_memory_monitor.erl
diff options
context:
space:
mode:
authorMarek Majkowski <majek@lshift.net>2009-10-27 16:01:27 +0000
committerMarek Majkowski <majek@lshift.net>2009-10-27 16:01:27 +0000
commit34ec9525426def320d29757ffd79d681133ed847 (patch)
treec44161ee7901efba7f08b8249e3f7eceb1161adb /src/vm_memory_monitor.erl
parent312ee842af2963b04ea0f0d705c22f83c4f9c002 (diff)
downloadrabbitmq-server-34ec9525426def320d29757ffd79d681133ed847.tar.gz
On the way towards perfect indentation.
Diffstat (limited to 'src/vm_memory_monitor.erl')
-rw-r--r--src/vm_memory_monitor.erl20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/vm_memory_monitor.erl b/src/vm_memory_monitor.erl
index 171573e7..d1bec186 100644
--- a/src/vm_memory_monitor.erl
+++ b/src/vm_memory_monitor.erl
@@ -178,16 +178,16 @@ parse_line_linux(Line) ->
%% A line looks like "Memory size: 1024 Megabytes"
parse_line_sunos(Line) ->
case string:tokens(Line, ":") of
- [Name, RHS | _Rest] ->
- [Value1 | UnitsRest] = string:tokens(RHS, " "),
- Value2 = case UnitsRest of
- ["Gigabytes"] -> list_to_integer(Value1) * 1024 * 1024 * 1024;
- ["Megabytes"] -> list_to_integer(Value1) * 1024 * 1024;
- ["Kilobytes"] -> list_to_integer(Value1) * 1024;
- _ -> Value1 ++ UnitsRest %% no known units
- end,
- {list_to_atom(Name), Value2};
- [Name] -> {list_to_atom(Name), none}
+ [Name, RHS | _Rest] ->
+ [Value1 | UnitsRest] = string:tokens(RHS, " "),
+ Value2 = case UnitsRest of
+ ["Gigabytes"] -> list_to_integer(Value1) * 1024 * 1024 * 1024;
+ ["Megabytes"] -> list_to_integer(Value1) * 1024 * 1024;
+ ["Kilobytes"] -> list_to_integer(Value1) * 1024;
+ _ -> Value1 ++ UnitsRest %% no known units
+ end,
+ {list_to_atom(Name), Value2};
+ [Name] -> {list_to_atom(Name), none}
end.