Skip to content

Commit

Permalink
Fix dialyzer
Browse files Browse the repository at this point in the history
Line 804 Column 42: Guard test User::maybe_improper_list() =:=
'undefined' can never succeed
Line 1152 Column 2: Invalid type specification for function
exec:do_unlink_ospid/3. The success typing is (_,_,_) -> 'ok' | 'true'
  • Loading branch information
joaohf committed Dec 22, 2023
1 parent 09a30ea commit 41fa6f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/exec.erl
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ init([Options]) ->
end,
debug(Debug, "exec: ~s~sport program: ~s\n~s",
[if SUID -> "[SUID] "; true -> "" end,
if (Root orelse IsRoot) andalso User =:= undefined -> "[ROOT] "; true -> "" end,
if (Root orelse IsRoot) andalso User =:= [] -> "[ROOT] "; true -> "" end,
Exe,
if Env =/= [] -> " env: "++?FMT("~p", Env)++"\n"; true -> "" end]),
try
Expand Down Expand Up @@ -1150,7 +1150,7 @@ check_options(Options) when is_list(Options) ->
%% @end
%%----------------------------------------------------------------------
-spec do_unlink_ospid(Pid::pid(), term(), State::#state{}) ->
{ok, LastTok::integer(), LeftLinks::integer()}.
ok | true.
do_unlink_ospid(Pid, _Reason, State) ->
case ets:lookup(exec_mon, Pid) of
[{_Pid, OsPid}] when is_integer(OsPid) ->
Expand Down

0 comments on commit 41fa6f3

Please sign in to comment.