diff options
author | Fredrik Gustafsson <[email protected]> | 2013-07-30 16:06:40 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-07-30 16:06:40 +0200 |
commit | e547c997a4e516d3474e577bd4747e249303a7c7 (patch) | |
tree | 01fe9326f74ba6f1bf58f9dbd0d71a17e8bcb60c /lib/kernel/src/inet_parse.erl | |
parent | d794ba8845619322639f24602624b9acd71efc98 (diff) | |
download | otp-e547c997a4e516d3474e577bd4747e249303a7c7.tar.gz otp-e547c997a4e516d3474e577bd4747e249303a7c7.tar.bz2 otp-e547c997a4e516d3474e577bd4747e249303a7c7.zip |
kernel: added ntoa documentation and exported it in inet.erl
Diffstat (limited to 'lib/kernel/src/inet_parse.erl')
-rw-r--r-- | lib/kernel/src/inet_parse.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kernel/src/inet_parse.erl b/lib/kernel/src/inet_parse.erl index 619c78a6ca..98bd8d386c 100644 --- a/lib/kernel/src/inet_parse.erl +++ b/lib/kernel/src/inet_parse.erl @@ -722,7 +722,9 @@ ntoa({0,0,0,0,0,16#ffff,A,B}) -> "::FFFF:" ++ dig_to_dec(A) ++ "." ++ dig_to_dec(B); ntoa({_,_,_,_,_,_,_,_}=T) -> %% Find longest sequence of zeros, at least 2, to replace with "::" - ntoa(tuple_to_list(T), []). + ntoa(tuple_to_list(T), []); +ntoa(_) -> + {error, einval}. %% Find first double zero ntoa([], R) -> |