Skip to content

Commit 9cf318b

Browse files
committed
C++: Autoformat the new query
Tweak whitespace, also in the alert message.
1 parent bf88df8 commit 9cf318b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cpp/ql/src/experimental/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @name Unsigned difference expression compared to zero
3-
* @description It is highly probable that the condition is wrong if the difference expression has the unsigned type.
4-
* The condition holds in all the cases when difference is not equal to zero. It means that we may use condition not equal.
3+
* @description It is highly probable that the condition is wrong if the difference expression has the unsigned type.
4+
* The condition holds in all the cases when difference is not equal to zero. It means that we may use condition not equal.
55
* But the programmer probably wanted to compare the difference of elements.
66
* @kind problem
77
* @id cpp/unsigned-difference-expression-compared-zero
@@ -16,8 +16,8 @@ import semmle.code.cpp.commons.Exclusions
1616

1717
from RelationalOperation ro, SubExpr sub
1818
where
19-
not isFromMacroDefinition(ro) and
19+
not isFromMacroDefinition(ro) and
2020
ro.getLesserOperand().getValue().toInt() = 0 and
2121
ro.getGreaterOperand() = sub and
2222
sub.getFullyConverted().getUnspecifiedType().(IntegralType).isUnsigned()
23-
select ro , " difference in condition is always greater than or equal to zero "
23+
select ro, "Difference in condition is always greater than or equal to zero"

0 commit comments

Comments
 (0)