aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src/rb.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/sasl/src/rb.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/sasl/src/rb.erl')
-rw-r--r--lib/sasl/src/rb.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sasl/src/rb.erl b/lib/sasl/src/rb.erl
index 8004ef2c5a..eb65aa8786 100644
--- a/lib/sasl/src/rb.erl
+++ b/lib/sasl/src/rb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-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
@@ -309,11 +309,11 @@ scan_files(RptDir, Max, Type) ->
{ok, Fd} ->
case catch file:read(Fd, 1) of
{ok, [LastWritten]} ->
- file:close(Fd),
+ ok = file:close(Fd),
Files = make_file_list(RptDir, LastWritten),
scan_files(RptDir, Files, Max, Type);
_X ->
- file:close(Fd),
+ _ = file:close(Fd),
exit("cannot read the index file")
end;
_X -> exit("cannot read the index file")
@@ -386,7 +386,7 @@ read_reports(No, Fd, Fname, Max, Type) ->
io:format("rb: reading report..."),
case catch read_reports(Fd, [], Type) of
{ok, Res} ->
- file:close(Fd),
+ ok = file:close(Fd),
io:format("done.~n"),
NewRes =
if
@@ -397,7 +397,7 @@ read_reports(No, Fd, Fname, Max, Type) ->
end,
add_report_data(NewRes, No, Fname);
{error, [Problem | Res]} ->
- file:close(Fd),
+ _ = file:close(Fd),
io:format("Error: ~p~n",[Problem]),
io:format("Salvaged ~p entries from corrupt report file ~s...~n",
[length(Res),Fname]),
@@ -898,7 +898,7 @@ handle_bad_form(Date, Msg, Device, Abort, Log) ->
end.
read_rep_msg(Fd, FilePosition) ->
- file:position(Fd, {bof, FilePosition}),
+ {ok,_} = file:position(Fd, {bof, FilePosition}),
Res =
case catch read_report(Fd) of
{ok, Report} ->
@@ -906,5 +906,5 @@ read_rep_msg(Fd, FilePosition) ->
{Date, Report};
_ -> error
end,
- file:close(Fd),
+ ok = file:close(Fd),
Res.