diff options
author | Kostis Sagonas <[email protected]> | 2010-03-07 11:05:06 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-04-28 07:04:56 +0200 |
commit | 75ea6a39d1cf4bd4a67391595b90d8d90155d012 (patch) | |
tree | 7641cd91bbe2a28399280d691fe3904e0cf26913 /lib/kernel/src/heart.erl | |
parent | 39e5ca57147c08502806f873c107c77e197a78ab (diff) | |
download | otp-75ea6a39d1cf4bd4a67391595b90d8d90155d012.tar.gz otp-75ea6a39d1cf4bd4a67391595b90d8d90155d012.tar.bz2 otp-75ea6a39d1cf4bd4a67391595b90d8d90155d012.zip |
kernel: Clean up as suggested by tidier
Diffstat (limited to 'lib/kernel/src/heart.erl')
-rw-r--r-- | lib/kernel/src/heart.erl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/kernel/src/heart.erl b/lib/kernel/src/heart.erl index bad0950fca..3710a00def 100644 --- a/lib/kernel/src/heart.erl +++ b/lib/kernel/src/heart.erl @@ -61,8 +61,8 @@ start() -> wait_for_init_ack(From) -> receive - {ok, From} -> - {ok, From}; + {ok, From} = Ok -> + Ok; {no_heart, From} -> ignore; {Error, From} -> @@ -119,8 +119,7 @@ wait() -> start_portprogram() -> check_start_heart(), - HeartCmd = "heart -pid " ++ os:getpid() ++ " " ++ - get_heart_timeouts(), + HeartCmd = "heart -pid " ++ os:getpid() ++ " " ++ get_heart_timeouts(), try open_port({spawn, HeartCmd}, [{packet, 2}]) of Port when is_port(Port) -> case wait_ack(Port) of @@ -175,7 +174,7 @@ wait_ack(Port) -> loop(Parent, Port, Cmd) -> send_heart_beat(Port), receive - {From, set_cmd, NewCmd} when is_list(NewCmd), length(NewCmd) < 2047 -> + {From, set_cmd, NewCmd} when length(NewCmd) < 2047 -> send_heart_cmd(Port, NewCmd), wait_ack(Port), From ! {heart, ok}, |