Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01dc366

Browse files
committed
C++: Autoformat.
1 parent 1ddabee commit 01dc366

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

cpp/ql/src/semmle/code/cpp/models/interfaces/FormattingFunction.qll

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,26 +136,22 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction {
136136
int getSizeParameterIndex() { none() }
137137

138138
override predicate hasArrayWithNullTerminator(int bufParam) {
139-
bufParam = getFormatParameterIndex()
140-
}
139+
bufParam = getFormatParameterIndex()
140+
}
141141

142142
override predicate hasArrayWithVariableSize(int bufParam, int countParam) {
143-
bufParam = getOutputParameterIndex() and
144-
countParam = getSizeParameterIndex()
143+
bufParam = getOutputParameterIndex() and
144+
countParam = getSizeParameterIndex()
145145
}
146146

147147
override predicate hasArrayWithUnknownSize(int bufParam) {
148-
bufParam = getOutputParameterIndex() and
149-
not exists(getSizeParameterIndex())
148+
bufParam = getOutputParameterIndex() and
149+
not exists(getSizeParameterIndex())
150150
}
151151

152-
predicate hasArrayInput(int bufParam) {
153-
bufParam = getFormatParameterIndex()
154-
}
152+
predicate hasArrayInput(int bufParam) { bufParam = getFormatParameterIndex() }
155153

156-
predicate hasArrayOutput(int bufParam) {
157-
bufParam = getOutputParameterIndex()
158-
}
154+
predicate hasArrayOutput(int bufParam) { bufParam = getOutputParameterIndex() }
159155

160156
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
161157
input.isParameterDeref(getFormatParameterIndex()) and

0 commit comments

Comments
 (0)