aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-05-02 09:37:58 +0200
committerHans Bolinder <[email protected]>2013-05-06 12:14:14 +0200
commit2324dec9fb37e301413c74acf1dce8ae3c29fc48 (patch)
tree7812afb9446ff1c7a8596a266a1cbd81eacc5f96 /lib/kernel/src/inet.erl
parent9e75f186c50071557d1846cf7267edfc942acdfb (diff)
downloadotp-2324dec9fb37e301413c74acf1dce8ae3c29fc48.tar.gz
otp-2324dec9fb37e301413c74acf1dce8ae3c29fc48.tar.bz2
otp-2324dec9fb37e301413c74acf1dce8ae3c29fc48.zip
Fix unmatched_returns warnings in Kernel
Diffstat (limited to 'lib/kernel/src/inet.erl')
-rw-r--r--lib/kernel/src/inet.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index b0f4adce2c..ad6b265b83 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -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}