aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/erlang.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-03-03 12:47:02 +0100
committerSverker Eriksson <[email protected]>2011-03-03 12:47:02 +0100
commit45892fd845b74532a6cae750372b6e80eb8e3ad9 (patch)
tree2c27332986f6803a6ef97072b0e8e70265b1fa59 /erts/preloaded/src/erlang.erl
parente38a935df26ca0f37fa17c6df771430de18f9043 (diff)
parentbe3218dc1bf7dec1217bcac82492a5550da7ee17 (diff)
downloadotp-45892fd845b74532a6cae750372b6e80eb8e3ad9.tar.gz
otp-45892fd845b74532a6cae750372b6e80eb8e3ad9.tar.bz2
otp-45892fd845b74532a6cae750372b6e80eb8e3ad9.zip
Merge branch 'sverker/dialyzer_kernel_fixes' into dev
* sverker/dialyzer_kernel_fixes: Fix dialyzer warning in os:start_port_srv_loop Update preloaded modules Fix three dialyzer warnings in kernel
Diffstat (limited to 'erts/preloaded/src/erlang.erl')
-rw-r--r--erts/preloaded/src/erlang.erl16
1 files changed, 5 insertions, 11 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index 935c2de253..d6dc070436 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -427,17 +427,11 @@ delay_trap(Result, Timeout) -> receive after Timeout -> Result end.
%% have to reflect that, which we cannot forsee.
%%
set_cookie(Node, C) when Node =/= nonode@nohost, is_atom(Node) ->
- Res = case C of
- _ when is_atom(C) ->
- auth:set_cookie(Node, C);
- {CI,CO} when is_atom(CI), is_atom(CO) ->
- auth:set_cookie(Node, {CI, CO});
- _ ->
- error
- end,
- case Res of
- error -> exit(badarg);
- Other -> Other
+ case is_atom(C) of
+ true ->
+ auth:set_cookie(Node, C);
+ false ->
+ error(badarg)
end.
-spec get_cookie() -> atom().