Skip to content

Commit

Permalink
Remove some boolean equality checks found by semgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Jan 24, 2024
1 parent fe4b6b1 commit 9a5d2e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/analyses/raceAnalysis.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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, _) ->
Expand Down
2 changes: 1 addition & 1 deletion src/incremental/compareCFG.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a5d2e3

Please sign in to comment.