aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/eldap/src/eldap.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/eldap/src/eldap.erl b/lib/eldap/src/eldap.erl
index 338ef19522..699dfc8791 100644
--- a/lib/eldap/src/eldap.erl
+++ b/lib/eldap/src/eldap.erl
@@ -1077,9 +1077,8 @@ parse_hostport(Str) ->
end.
parse_port(Rest,Sport) ->
- case list_to_integer(Sport) of
- Port when is_integer(Port) -> Port;
- _ -> parse_error(parsing_port,Rest)
+ try list_to_integer(Sport)
+ catch _:_ -> parse_error(parsing_port,Rest)
end.
parse_host(Rest,Shost) ->