Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-09-06 18:41:09 +0300
committerBadlop <badlop@process-one.net>2022-09-07 14:57:12 +0300
commit17a583514367a52ddbca12dd5ab621262adaf50e (patch)
treedb063529f3c27f44b0739c74eac0dba224e1ed6b
parentf542a823090a16e4545a988f6231d6b096600442 (diff)
Simplify recent commit (thanks to Simon Lipp)(#3894)
-rw-r--r--src/misc.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/misc.erl b/src/misc.erl
index 8662e5f19..232e0ea33 100644
--- a/src/misc.erl
+++ b/src/misc.erl
@@ -220,15 +220,13 @@ encode_base64(Data) ->
-spec ip_to_list(inet:ip_address() | undefined |
{inet:ip_address(), inet:port_number()}) -> binary().
-ip_to_list({local, _}) ->
- <<"unix">>;
-ip_to_list(local) ->
- <<"unix">>;
ip_to_list({IP, _Port}) ->
ip_to_list(IP);
%% This function clause could use inet_parse too:
ip_to_list(undefined) ->
<<"unknown">>;
+ip_to_list(local) ->
+ <<"unix">>;
ip_to_list(IP) ->
list_to_binary(inet_parse:ntoa(IP)).