Remove hack with binary to integer conversion

This commit is contained in:
Evgeniy Khramtsov 2015-04-08 16:11:06 +03:00
parent 7a89dda816
commit 32b60d4250
1 changed files with 2 additions and 4 deletions

View File

@ -940,10 +940,8 @@ ip_to_list(IP) ->
binary_to_atom(Bin) ->
erlang:binary_to_atom(Bin, utf8).
binary_to_integer(Bin) when is_binary(Bin) ->
list_to_integer(binary_to_list(Bin));
binary_to_integer(Bin) when is_integer(Bin) ->
Bin.
binary_to_integer(Bin) ->
list_to_integer(binary_to_list(Bin)).
binary_to_integer(Bin, Base) ->
list_to_integer(binary_to_list(Bin), Base).