diff options
Diffstat (limited to 'lib/kernel/src/inet.erl')
-rw-r--r-- | lib/kernel/src/inet.erl | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl index 27f085c3aa..9cfd3819f0 100644 --- a/lib/kernel/src/inet.erl +++ b/lib/kernel/src/inet.erl @@ -407,7 +407,7 @@ gethostbyname(Name,Family) -> gethostbyname(Name,Family,Timeout) -> Timer = start_timer(Timeout), Res = gethostbyname_tm(Name,Family,Timer), - stop_timer(Timer), + _ = stop_timer(Timer), Res. gethostbyname_tm(Name,Family,Timer) -> @@ -438,7 +438,7 @@ gethostbyaddr(Address) -> gethostbyaddr(Address,Timeout) -> Timer = start_timer(Timeout), Res = gethostbyaddr_tm(Address, Timer), - stop_timer(Timer), + _ = stop_timer(Timer), Res. gethostbyaddr_tm(Address,Timer) -> @@ -493,7 +493,7 @@ getaddr(Address, Family) -> getaddr(Address, Family, Timeout) -> Timer = start_timer(Timeout), Res = getaddr_tm(Address, Family, Timer), - stop_timer(Timer), + _ = stop_timer(Timer), Res. getaddr_tm(Address, Family, Timer) -> @@ -519,7 +519,7 @@ getaddrs(Address, Family) -> getaddrs(Address, Family, Timeout) -> Timer = start_timer(Timeout), Res = getaddrs_tm(Address, Family, Timer), - stop_timer(Timer), + _ = stop_timer(Timer), Res. -spec getservbyport(Port :: port_number(), Protocol :: atom() | string()) -> @@ -1445,7 +1445,7 @@ tcp_controlling_process(S, NewOwner) when is_port(S), is_pid(NewOwner) -> {ok, A0} -> case A0 of false -> ok; - _ -> prim_inet:setopt(S, active, false) + _ -> ok = prim_inet:setopt(S, active, false) end, case tcp_sync_input(S, NewOwner, false) of true -> %% socket already closed, @@ -1456,7 +1456,7 @@ tcp_controlling_process(S, NewOwner) when is_port(S), is_pid(NewOwner) -> unlink(S), %% unlink from port case A0 of false -> ok; - _ -> prim_inet:setopt(S, active, A0) + _ -> ok = prim_inet:setopt(S, active, A0) end, ok catch @@ -1499,13 +1499,12 @@ udp_controlling_process(S, NewOwner) when is_port(S), is_pid(NewOwner) -> {error, not_owner}; _ -> {ok, A0} = prim_inet:getopt(S, active), - prim_inet:setopt(S, active, false), + ok = prim_inet:setopt(S, active, false), udp_sync_input(S, NewOwner), try erlang:port_connect(S, NewOwner) of true -> unlink(S), - prim_inet:setopt(S, active, A0), - ok + ok = prim_inet:setopt(S, active, A0) catch error:Reason -> {error, Reason} |