diff options
author | Micael Karlberg <[email protected]> | 2019-06-14 11:13:34 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-06-27 17:50:57 +0200 |
commit | 04b795f59e678e550fb8c7650952c5ded1096cef (patch) | |
tree | 27544878eff0b1063babbe3c2c8b3c61bc216852 /lib/snmp/src/agent/snmpa_mib_storage_dets.erl | |
parent | 331a5f531326da2d0ac23a1fa40c8a51a749c464 (diff) | |
download | otp-04b795f59e678e550fb8c7650952c5ded1096cef.tar.gz otp-04b795f59e678e550fb8c7650952c5ded1096cef.tar.bz2 otp-04b795f59e678e550fb8c7650952c5ded1096cef.zip |
[snmp|agent] Dialyzer related changes
Changes to satisfy dialyzer. Including changing the definition
of some of the behaviours (use the '-callback' attribute instead
of an explicit behaviour_info/1 function).
Also found and corrected some (apparently minor) bugs.
OTP-15932
Diffstat (limited to 'lib/snmp/src/agent/snmpa_mib_storage_dets.erl')
-rw-r--r-- | lib/snmp/src/agent/snmpa_mib_storage_dets.erl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/snmp/src/agent/snmpa_mib_storage_dets.erl b/lib/snmp/src/agent/snmpa_mib_storage_dets.erl index 2459b6bc3e..0fcb8083f5 100644 --- a/lib/snmp/src/agent/snmpa_mib_storage_dets.erl +++ b/lib/snmp/src/agent/snmpa_mib_storage_dets.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2013-2016. All Rights Reserved. +%% Copyright Ericsson AB 2013-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -291,16 +291,16 @@ dets_backup(close, _Cont, _ID, B) -> ok; dets_backup(read, Cont1, ID, B) -> case dets:bchunk(ID, Cont1) of + {error, _} = ERROR -> + ERROR; + '$end_of_table' -> + dets:close(B), + end_of_input; {Cont2, Data} -> F = fun(Arg) -> dets_backup(Arg, Cont2, ID, B) end, - {Data, F}; - '$end_of_table' -> - dets:close(B), - end_of_input; - Error -> - Error + {Data, F} end. |