Skip to content

Commit f648b02

Browse files
committed
Despecialise parameter names for precededBySync
1 parent bd6c167 commit f648b02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

go/ql/src/InconsistentCode/UnhandledCloseWritableHandle.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,20 @@ class UnhandledFileCloseDataFlowConfiguration extends DataFlow::Configuration {
124124
}
125125

126126
/**
127-
* Holds if a `DataFlow::CallNode` is preceded by a call to `os.File.Sync`.
127+
* Holds if a `node` is preceded by a call to `os.File.Sync`.
128128
*/
129-
predicate precededBySync(DataFlow::Node close, DataFlow::CallNode closeCall) {
129+
predicate precededBySync(DataFlow::Node node, DataFlow::CallNode call) {
130130
// using the control flow graph, try to find a call to a handled call to `os.File.Sync`
131131
// which precedes `closeCall`.
132132
exists(IR::Instruction instr, DataFlow::Node syncReceiver, DataFlow::CallNode syncCall |
133133
// find a predecessor to `closeCall` in the control flow graph
134-
instr = closeCall.asInstruction().getAPredecessor*() and
134+
instr = call.asInstruction().getAPredecessor*() and
135135
// match the instruction corresponding to an `os.File.Sync` call with the predecessor
136136
syncCall.asInstruction() = instr and
137137
// check that the call to `os.File.Sync` is handled
138138
isHandledSync(syncReceiver, syncCall) and
139139
// check that `os.File.Sync` is called on the same object as `os.File.Close`
140-
exists(DataFlow::SsaNode ssa | ssa.getAUse() = close and ssa.getAUse() = syncReceiver)
140+
exists(DataFlow::SsaNode ssa | ssa.getAUse() = node and ssa.getAUse() = syncReceiver)
141141
)
142142
}
143143

0 commit comments

Comments
 (0)