File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
go/ql/src/InconsistentCode Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments