Skip to content

Commit 07b317e

Browse files
authored
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]>
1 parent 7732801 commit 07b317e

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

bazel/yara_deps.bzl

-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@
2727

2828
"""Load dependencies needed to compile YARA as a 3rd-party consumer."""
2929

30-
3130
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
3231
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3332
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
3433

35-
3634
def yara_deps():
3735
"""Loads common dependencies needed to compile YARA."""
3836
maybe(

sandbox/collect_matches.cc

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ int CollectMatches(
7171
meta->set_bytes_value(rule_meta->string);
7272
break;
7373
}
74-
++rule_meta;
7574
}
7675

7776
return ERROR_SUCCESS;

0 commit comments

Comments
 (0)