Skip to content

Commit 7ee8379

Browse files
committed
Remove redundant predicate uses
1 parent 9e60a8f commit 7ee8379

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

c/misra/src/rules/RULE-21-13/CtypeFunctionArgNotUnsignedCharOrEof.ql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ from UseOfToOrIsChar ctypeCall
1919
where
2020
not isExcluded(ctypeCall,
2121
StandardLibraryFunctionTypesPackage::ctypeFunctionArgNotUnsignedCharOrEofQuery()) and
22-
not exists(Expr ctypeCallArgument |
23-
ctypeCallArgument = ctypeCall.getConvertedArgument().getExplicitlyConverted()
24-
|
22+
not exists(Expr ctypeCallArgument | ctypeCallArgument = ctypeCall.getConvertedArgument() |
2523
/* The argument's value should be in the EOF + `unsigned char` range. */
2624
-1 <= lowerBound(ctypeCallArgument) and upperBound(ctypeCallArgument) <= 255
2725
)
2826
select ctypeCall,
29-
"The <ctype.h> function " + ctypeCall + " accepts an argument " +
30-
ctypeCall.getConvertedArgument().toString() + " that is not an unsigned char nor an EOF."
27+
"The <ctype.h> function " + ctypeCall + " accepts an argument " + ctypeCall.getConvertedArgument()
28+
+ " that is not an unsigned char nor an EOF."

0 commit comments

Comments
 (0)