summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexey Shchepin <alexey@process-one.net>2010-12-20 17:56:24 +0200
committerAlexey Shchepin <alexey@process-one.net>2010-12-20 19:29:05 +0200
commitb47c50145d6c0b9643dc3d9578617e3231cdf793 (patch)
tree787a1e4a71b16633220c9b45c2d35b6b9053ec48 /src
parentRevert branch name back to 2.1.x (diff)
Make jlib:ip_to_list safe to use
Diffstat (limited to 'src')
-rw-r--r--src/jlib.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jlib.erl b/src/jlib.erl
index cb70c5a4..1d5648a2 100644
--- a/src/jlib.erl
+++ b/src/jlib.erl
@@ -803,4 +803,6 @@ ip_to_list({_,_,_,_,_,_,_,_} = Ipv6Address) ->
inet_parse:ntoa(Ipv6Address);
%% This function clause could use inet_parse too:
ip_to_list({A,B,C,D}) ->
- lists:flatten(io_lib:format("~w.~w.~w.~w",[A,B,C,D])).
+ lists:flatten(io_lib:format("~w.~w.~w.~w",[A,B,C,D]));
+ip_to_list(IP) ->
+ lists:flatten(io_lib:format("~w", [IP])).