mirror of
https://github.com/github/codeql.git
synced 2026-03-05 15:16:47 +01:00
C++: Make the two queries more alike.
This commit is contained in:
@@ -15,12 +15,7 @@
|
||||
import cpp
|
||||
|
||||
class Allocation extends FunctionCall {
|
||||
Allocation() {
|
||||
exists(string name |
|
||||
this.getTarget().hasGlobalOrStdName(name) and
|
||||
(name = "malloc" or name = "calloc" or name = "realloc")
|
||||
)
|
||||
}
|
||||
Allocation() { this.getTarget().hasGlobalOrStdName(["malloc", "calloc", "realloc"]) }
|
||||
|
||||
private string getName() { this.getTarget().hasGlobalOrStdName(result) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user