diff options
author | Hans Nilsson <[email protected]> | 2017-11-16 14:57:46 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-11-16 14:57:46 +0100 |
commit | 0a35e158022d5f04fbb3178744098237d8ec550f (patch) | |
tree | e5d49628c7f555885f38159a4c68b46a49937a5d /lib/ssh/src/ssh_transport.erl | |
parent | 25b65f9f790f2b36846b414ac51d8d2a079dc49a (diff) | |
parent | 12e3758d65c6fc6d42642fb7d4f59ac9f10081f6 (diff) | |
download | otp-0a35e158022d5f04fbb3178744098237d8ec550f.tar.gz otp-0a35e158022d5f04fbb3178744098237d8ec550f.tar.bz2 otp-0a35e158022d5f04fbb3178744098237d8ec550f.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/ssh/src/ssh_transport.erl')
-rw-r--r-- | lib/ssh/src/ssh_transport.erl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl index 892db6b64f..90a94a7e86 100644 --- a/lib/ssh/src/ssh_transport.erl +++ b/lib/ssh/src/ssh_transport.erl @@ -2027,12 +2027,6 @@ same(Algs) -> [{client2server,Algs}, {server2client,Algs}]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% trim_tail(Str) -> - lists:reverse(trim_head(lists:reverse(Str))). - -trim_head([$\s|Cs]) -> trim_head(Cs); -trim_head([$\t|Cs]) -> trim_head(Cs); -trim_head([$\n|Cs]) -> trim_head(Cs); -trim_head([$\r|Cs]) -> trim_head(Cs); -trim_head(Cs) -> Cs. - - + lists:takewhile(fun(C) -> + C=/=$\r andalso C=/=$\n + end, Str). |