diff options
author | Badlop <badlop@process-one.net> | 2022-09-06 17:41:09 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2022-09-07 13:57:12 +0200 |
commit | 17a583514367a52ddbca12dd5ab621262adaf50e (patch) | |
tree | db063529f3c27f44b0739c74eac0dba224e1ed6b | |
parent | feat: do not clone repo inside container build (diff) |
Simplify recent commit (thanks to Simon Lipp)(#3894)
-rw-r--r-- | src/misc.erl | 6 |
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)). |