25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

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

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).