Skip to content

Commit f68915e

Browse files
committed
Use _ instead of exists variable x2
1 parent 96cbce5 commit f68915e

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

go/ql/lib/semmle/go/dataflow/SsaImpl.qll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,8 @@ private module Internal {
349349
varBlockReachesBaseCand(v, b1, b2) and
350350
blockPrecedesVar(v, b2)
351351
or
352-
exists(ReachableBasicBlock mid |
353-
varBlockReachesRecCand(v, b1, mid, b2) and
354-
blockPrecedesVar(v, b2)
355-
)
352+
varBlockReachesRecCand(v, b1, _, b2) and
353+
blockPrecedesVar(v, b2)
356354
}
357355

358356
/**

go/ql/lib/semmle/go/security/LogInjectionCustomizations.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ module LogInjection {
7979
*/
8080
private class SafeFormatArgumentSanitizer extends Sanitizer {
8181
SafeFormatArgumentSanitizer() {
82-
exists(DataFlow::Node arg, StringOps::Formatting::StringFormatCall call |
83-
safeFormatArgument(arg, call)
84-
|
82+
exists(StringOps::Formatting::StringFormatCall call | safeFormatArgument(_, call) |
8583
this = call.getAResult()
8684
)
8785
}

0 commit comments

Comments
 (0)