Skip to content

Commit a0cbd87

Browse files
committed
[zlaski/memset-model] Rename predicate usage as per PR/1938.
1 parent ae169e9 commit a0cbd87

File tree

1 file changed

+8
-10
lines changed
  • cpp/ql/src/semmle/code/cpp/models/implementations

1 file changed

+8
-10
lines changed

cpp/ql/src/semmle/code/cpp/models/implementations/Memset.qll

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,22 @@ class MemsetFunction extends ArrayFunction, DataFlowFunction, AliasFunction {
2020
override predicate hasArrayOutput(int bufParam) { bufParam = 0 }
2121

2222
override predicate hasDataFlow(FunctionInput input, FunctionOutput output) {
23-
input.isInParameter(0) and
24-
output.isOutReturnValue()
23+
input.isParameter(0) and
24+
output.isReturnValue()
2525
}
2626

2727
override predicate hasArrayWithVariableSize(int bufParam, int countParam) {
2828
bufParam = 0 and
2929
(if hasGlobalName("bzero") then countParam = 1 else countParam = 2)
3030
}
31-
32-
override predicate parameterNeverEscapes(int index) {
33-
hasGlobalName("bzero") and index = 0
34-
}
35-
31+
32+
override predicate parameterNeverEscapes(int index) { hasGlobalName("bzero") and index = 0 }
33+
3634
override predicate parameterEscapesOnlyViaReturn(int index) {
37-
not hasGlobalName("bzero") and index = 0
35+
not hasGlobalName("bzero") and index = 0
3836
}
39-
37+
4038
override predicate parameterIsAlwaysReturned(int index) {
41-
not hasGlobalName("bzero") and index = 0
39+
not hasGlobalName("bzero") and index = 0
4240
}
4341
}

0 commit comments

Comments
 (0)