diff options
author | Siri Hansen <[email protected]> | 2013-04-26 14:21:12 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2013-05-06 12:14:14 +0200 |
commit | 19d41eefa1cf4856587930d99959bbed73a818b5 (patch) | |
tree | 51cbb92f4e3e6ae31d678c26e4f49056f144af2e /lib/sasl/src/rb.erl | |
parent | f52452309cf68da898a1768eb6e8b6767e602bc7 (diff) | |
download | otp-19d41eefa1cf4856587930d99959bbed73a818b5.tar.gz otp-19d41eefa1cf4856587930d99959bbed73a818b5.tar.bz2 otp-19d41eefa1cf4856587930d99959bbed73a818b5.zip |
Fix unmatched_return warnings in sasl
Diffstat (limited to 'lib/sasl/src/rb.erl')
-rw-r--r-- | lib/sasl/src/rb.erl | 14 |
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. |