diff options
author | Niclas Eklund <[email protected]> | 2010-06-02 12:53:05 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-06-02 12:53:05 +0000 |
commit | ea0419df3393f0fe304d57dac8723e1d1e4b4344 (patch) | |
tree | cc6cadc39cdc2a9f827d61d7652a7beda115a5fc /lib/ssh | |
parent | b0fac292636d789bcecc3aea3fc3eb403aef8357 (diff) | |
download | otp-ea0419df3393f0fe304d57dac8723e1d1e4b4344.tar.gz otp-ea0419df3393f0fe304d57dac8723e1d1e4b4344.tar.bz2 otp-ea0419df3393f0fe304d57dac8723e1d1e4b4344.zip |
Fixing compiler warnings regarding max/2
Diffstat (limited to 'lib/ssh')
-rw-r--r-- | lib/ssh/src/ssh_cli.erl | 6 | ||||
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl index 2764ea2e43..e3b6ffa125 100644 --- a/lib/ssh/src/ssh_cli.erl +++ b/lib/ssh/src/ssh_cli.erl @@ -327,7 +327,7 @@ window_change(Tty, OldTty, Buf) {[], Buf}; window_change(Tty, OldTty, {Buf, BufTail, Col}) -> M1 = move_cursor(Col, 0, OldTty), - N = max(Tty#ssh_pty.width - OldTty#ssh_pty.width, 0) * 2, + N = erlang:max(Tty#ssh_pty.width - OldTty#ssh_pty.width, 0) * 2, S = lists:reverse(Buf, [BufTail | lists:duplicate(N, $ )]), M2 = move_cursor(length(Buf) + length(BufTail) + N, Col, Tty), {[M1, S | M2], {Buf, BufTail, Col}}. @@ -398,10 +398,6 @@ nthtail(0, A) -> A; nthtail(N, [_ | A]) when N > 0 -> nthtail(N-1, A); nthtail(_, _) -> []. -%%% utils -max(A, B) when A > B -> A; -max(_A, B) -> B. - ifelse(Cond, A, B) -> case Cond of true -> A; diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index 822ef8f8f9..d46002c494 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -527,7 +527,7 @@ handle_info({Protocol, Socket, Data}, Statename, %% Implementations SHOULD decrypt the length after receiving the %% first 8 (or cipher block size, whichever is larger) bytes of a %% packet. (RFC 4253: Section 6 - Binary Packet Protocol) - case size(EncData0) + size(Data) >= max(8, BlockSize) of + case size(EncData0) + size(Data) >= erlang:max(8, BlockSize) of true -> {Ssh, SshPacketLen, DecData, EncData} = @@ -758,11 +758,6 @@ after_new_keys(#state{renegotiate = false, ssh_params = #ssh{role = server}} = State) -> {userauth, State}. -max(N, M) when N > M -> - N; -max(_, M) -> - M. - handle_ssh_packet_data(RemainingSshPacketLen, DecData, EncData, StateName, State) -> EncSize = size(EncData), |