From 96d1f00687ddeed7dda189c89994c1aa48c787ec Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Tue, 14 Aug 2018 07:08:21 -0700 Subject: [PATCH] Minor simplifications Reviewed By: jeremydubreil Differential Revision: D9313650 fbshipit-source-id: 0891e5d33 --- infer/src/biabduction/RetainCycles.ml | 2 +- infer/src/biabduction/SymExec.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infer/src/biabduction/RetainCycles.ml b/infer/src/biabduction/RetainCycles.ml index 20c5da86a..117d4a0e6 100644 --- a/infer/src/biabduction/RetainCycles.ml +++ b/infer/src/biabduction/RetainCycles.ml @@ -238,7 +238,7 @@ let report_cycle tenv summary prop = unsafe_unretained fields. Otherwise we report a retain cycle. *) let cycles = get_retain_cycles tenv prop in RetainCyclesType.Set.iter RetainCyclesType.print_cycle cycles ; - if RetainCyclesType.Set.cardinal cycles > 0 then ( + if not (RetainCyclesType.Set.is_empty cycles) then ( RetainCyclesType.Set.iter (fun cycle -> let exn = exn_retain_cycle tenv cycle in diff --git a/infer/src/biabduction/SymExec.ml b/infer/src/biabduction/SymExec.ml index 00a56b7e4..86454bcb4 100644 --- a/infer/src/biabduction/SymExec.ml +++ b/infer/src/biabduction/SymExec.ml @@ -1960,7 +1960,7 @@ and sym_exec_wrapper exe_env handle_exn tenv summary proc_cfg instr (* Check for retain cycles after assignments and method calls *) ( match instr with | (Sil.Store _ | Sil.Call _) when !Config.footprint -> - List.iter ~f:(RetainCycles.report_cycle tenv summary) [p] + RetainCycles.report_cycle tenv summary p | _ -> () ) ; let node_has_abstraction node =