aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-05-06 12:16:38 +0200
committerHans Bolinder <[email protected]>2013-05-06 12:16:38 +0200
commit551d92fead40277f2152a7351ed6ab19b623b16b (patch)
tree7812afb9446ff1c7a8596a266a1cbd81eacc5f96 /lib/kernel/src/inet.erl
parent0dc5a00011d1d24b68c9d43ff608415f84c50499 (diff)
parent2324dec9fb37e301413c74acf1dce8ae3c29fc48 (diff)
downloadotp-551d92fead40277f2152a7351ed6ab19b623b16b.tar.gz
otp-551d92fead40277f2152a7351ed6ab19b623b16b.tar.bz2
otp-551d92fead40277f2152a7351ed6ab19b623b16b.zip
Merge branch 'hb/unmatched_returns/OTP-10908'
* hb/unmatched_returns/OTP-10908: Fix unmatched_returns warnings in Kernel Fix a minor bug in ets:tabfile_info() and ets:file2tab() Fix unmatched_returns warning in Kernel Fix unmatched_return warnings in sasl Fix unmatched_return warnings in kernel Fix unmatched_return warning in erl_prim_loader Fix unmatched_return warnings in stdlib Fix unmatched_returns warnings in STDLIB and Kernel
Diffstat (limited to 'lib/kernel/src/inet.erl')
-rw-r--r--lib/kernel/src/inet.erl19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index 9670271b2e..ad6b265b83 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -389,7 +389,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) ->
@@ -420,7 +420,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) ->
@@ -475,7 +475,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) ->
@@ -501,7 +501,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()) ->
@@ -1331,7 +1331,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,
@@ -1342,7 +1342,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
@@ -1385,13 +1385,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}