From 9a5d2e3767685253b41022e8072c7c18734749da Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Wed, 24 Jan 2024 12:11:59 +0200 Subject: [PATCH] Remove some boolean equality checks found by semgrep --- src/analyses/raceAnalysis.ml | 2 +- src/incremental/compareCFG.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/analyses/raceAnalysis.ml b/src/analyses/raceAnalysis.ml index 6b7217147e..7dae319d6f 100644 --- a/src/analyses/raceAnalysis.ml +++ b/src/analyses/raceAnalysis.ml @@ -349,7 +349,7 @@ struct | ts when Queries.TS.is_top ts -> includes_uk := true | ts -> - if Queries.TS.is_empty ts = false then + if not (Queries.TS.is_empty ts) then includes_uk := true; let f = function | TComp (ci, _) -> diff --git a/src/incremental/compareCFG.ml b/src/incremental/compareCFG.ml index 55b3fa8fc5..84b120b8e3 100644 --- a/src/incremental/compareCFG.ml +++ b/src/incremental/compareCFG.ml @@ -97,7 +97,7 @@ let compareCfgs (module CfgOld : CfgForward) (module CfgNew : CfgForward) fun1 f * case the edge is directly added to the diff set to avoid undetected ambiguities during the recursive * call. *) let testFalseEdge edge = match edge with - | Test (p,b) -> p = Cil.one && b = false + | Test (p,false) -> p = Cil.one | _ -> false in let posAmbigEdge edgeList = let findTestFalseEdge (ll,_) = testFalseEdge (snd (List.hd ll)) in let numDuplicates l = List.length (List.find_all findTestFalseEdge l) in