From 04b795f59e678e550fb8c7650952c5ded1096cef Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Fri, 14 Jun 2019 11:13:34 +0200 Subject: [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 --- lib/snmp/src/agent/snmpa_local_db.erl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/snmp/src/agent/snmpa_local_db.erl') diff --git a/lib/snmp/src/agent/snmpa_local_db.erl b/lib/snmp/src/agent/snmpa_local_db.erl index f481641242..c9093fcdb9 100644 --- a/lib/snmp/src/agent/snmpa_local_db.erl +++ b/lib/snmp/src/agent/snmpa_local_db.erl @@ -733,16 +733,16 @@ dets_backup(close, _Cont, _D, B) -> ok; dets_backup(read, Cont1, D, B) -> case dets:bchunk(D, Cont1) of + {error, _} = ERROR -> + ERROR; + '$end_of_table' -> + dets:close(B), + end_of_input; {Cont2, Data} -> F = fun(Arg) -> dets_backup(Arg, Cont2, D, B) end, - {Data, F}; - '$end_of_table' -> - dets:close(B), - end_of_input; - Error -> - Error + {Data, F} end. -- cgit v1.2.3