mirror of
https://github.com/VirusTotal/yara.git
synced 2026-10-11 22:49:58 +00:00
Sandbox: Fix loop in CollectMatches() (#1412)
The `CollectMatches()` function uses the `yr_rule_metas_foreach()` macro iterate over the rule metadata. The macro expands to a for-loop that already increments the loop variable, so we should not do this again. Drive-by: - Run Buildifier on `bazel/yara_deps.bzl`, deleting a few empty lines Signed-off-by: Christian Blichmann <[email protected]>
This commit is contained in:
@@ -27,12 +27,10 @@
|
||||
|
||||
"""Load dependencies needed to compile YARA as a 3rd-party consumer."""
|
||||
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
||||
|
||||
|
||||
def yara_deps():
|
||||
"""Loads common dependencies needed to compile YARA."""
|
||||
maybe(
|
||||
|
||||
@@ -71,7 +71,6 @@ int CollectMatches(
|
||||
meta->set_bytes_value(rule_meta->string);
|
||||
break;
|
||||
}
|
||||
++rule_meta;
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user