Skip to content

Commit

Permalink
[eldap] Fix parse_port error handling
Browse files Browse the repository at this point in the history
Dialyzer found that.
  • Loading branch information
dgud committed Mar 28, 2012
1 parent c17aa8b commit 1ff967c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/eldap/src/eldap.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down

0 comments on commit 1ff967c

Please sign in to comment.