Skip to content

Commit d0323a6

Browse files
committed
Fix one more violation.
1 parent ea664e0 commit d0323a6

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

go/ql/src/experimental/IntegerOverflow/RangeAnalysis.qll

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,15 @@ float getAnSsaUpperBound(SsaDefinition def) {
377377
getAUse(prevDef) = compoundAssign.getLhs() and
378378
assignInstr = IR::assignInstruction(compoundAssign, 0) and
379379
prevBound = getAnSsaUpperBound(prevDef) and
380-
if compoundAssign instanceof AddAssignStmt
381-
then
380+
(
381+
compoundAssign instanceof AddAssignStmt and
382382
delta = getAnUpperBound(compoundAssign.getRhs()) and
383383
result = addRoundingUp(prevBound, delta)
384-
else
385-
if compoundAssign instanceof SubAssignStmt
386-
then
387-
delta = getALowerBound(compoundAssign.getRhs()) and
388-
result = addRoundingUp(prevBound, -delta)
389-
else none()
384+
or
385+
compoundAssign instanceof SubAssignStmt and
386+
delta = getALowerBound(compoundAssign.getRhs()) and
387+
result = addRoundingUp(prevBound, -delta)
388+
)
390389
)
391390
else
392391
//SSA definition coresponding to an `IncDecStmt`

0 commit comments

Comments
 (0)