aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reltool/src
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2011-03-06 18:11:00 +0200
committerNiclas Axelsson <[email protected]>2011-03-07 15:44:27 +0100
commit31587d41408c94d6a5d4587896d903e03c94fcc7 (patch)
tree4fcb27b59509c627aad86409cdafb86570c7efcd /lib/reltool/src
parent5752f7a6718a205acb1ea8b0f341bf0fd6630461 (diff)
downloadotp-31587d41408c94d6a5d4587896d903e03c94fcc7.tar.gz
otp-31587d41408c94d6a5d4587896d903e03c94fcc7.tar.bz2
otp-31587d41408c94d6a5d4587896d903e03c94fcc7.zip
Eliminate two dialyzer warnings
Diffstat (limited to 'lib/reltool/src')
-rw-r--r--lib/reltool/src/reltool_server.erl26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl
index 1a2d956a18..59f52087a1 100644
--- a/lib/reltool/src/reltool_server.erl
+++ b/lib/reltool/src/reltool_server.erl
@@ -1410,27 +1410,27 @@ decode(#mod{} = Mod, [{Key, Val} | KeyVals], Status) ->
end,
decode(Mod2, KeyVals, Status2);
decode(#rel{rel_apps = RelApps} = Rel, [RelApp | KeyVals], Status) ->
- RA =
+ {ValidTypesAssigned, RA} =
case RelApp of
Name when is_atom(Name) ->
- #rel_app{name = Name, app_type = undefined, incl_apps = []};
+ {true, #rel_app{name = Name}};
{Name, Type} when is_atom(Name) ->
- #rel_app{name = Name, app_type = Type, incl_apps = []};
+ {is_type(Type), #rel_app{name = Name, app_type = Type}};
{Name, InclApps} when is_atom(Name), is_list(InclApps) ->
- #rel_app{name = Name,
- app_type = undefined,
- incl_apps = InclApps};
+ VI = lists:all(fun erlang:is_atom/1, InclApps),
+ {VI, #rel_app{name = Name, incl_apps = InclApps}};
{Name, Type, InclApps} when is_atom(Name), is_list(InclApps) ->
- #rel_app{name = Name, app_type = Type, incl_apps = InclApps};
+ VT = is_type(Type),
+ VI = lists:all(fun erlang:is_atom/1, InclApps),
+ {VT andalso VI,
+ #rel_app{name = Name, app_type = Type, incl_apps = InclApps}};
_ ->
- #rel_app{incl_apps = []}
+ {false, #rel_app{incl_apps = []}}
end,
- IsType = is_type(RA#rel_app.app_type),
- NonAtoms = [IA || IA <- RA#rel_app.incl_apps, not is_atom(IA)],
- if
- IsType, NonAtoms =:= [] ->
+ case ValidTypesAssigned of
+ true ->
decode(Rel#rel{rel_apps = RelApps ++ [RA]}, KeyVals, Status);
- true ->
+ false ->
Text = lists:flatten(io_lib:format("~p", [RelApp])),
Status2 =
reltool_utils:return_first_error(Status,