Skip to content

Commit bb0e6a3

Browse files
committed
Declarations8: address review comments
1 parent a9a9fe1 commit bb0e6a3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

c/cert/src/rules/DCL30-C/AppropriateStorageDurationsFunctionReturn.ql

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,16 @@
1313

1414
import cpp
1515
import codingstandards.c.cert
16-
import codingstandards.cpp.FunctionParameter
1716
import semmle.code.cpp.dataflow.DataFlow
1817

1918
class Source extends StackVariable {
20-
Source() { not this instanceof FunctionParameter }
19+
Source() { not this instanceof Parameter }
2120
}
2221

23-
abstract class Sink extends DataFlow::Node { }
24-
25-
class FunctionSink extends Sink {
26-
FunctionSink() {
22+
class Sink extends DataFlow::Node {
23+
Sink() {
2724
//output parameter
28-
exists(FunctionParameter f |
25+
exists(Parameter f |
2926
f.getAnAccess() = this.(DataFlow::PostUpdateNode).getPreUpdateNode().asExpr() and
3027
f.getUnderlyingType() instanceof PointerType
3128
)

0 commit comments

Comments
 (0)