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:
Christian Blichmann
2020-12-02 22:03:07 +01:00
committed by GitHub
parent 77328011a3
commit 07b317eb8c
2 changed files with 0 additions and 3 deletions
-2
View File
@@ -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(
-1
View File
@@ -71,7 +71,6 @@ int CollectMatches(
meta->set_bytes_value(rule_meta->string);
break;
}
++rule_meta;
}
return ERROR_SUCCESS;