aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-09-06 17:41:09 +0200
committerBadlop <badlop@process-one.net>2022-09-07 13:57:12 +0200
commit17a583514367a52ddbca12dd5ab621262adaf50e (patch)
treedb063529f3c27f44b0739c74eac0dba224e1ed6b
parentfeat: do not clone repo inside container build (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)).