[Forensics-changes] [yara] 233/415: Small optimization
Hilko Bengen
bengen at moszumanska.debian.org
Thu Apr 3 05:43:09 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository yara.
commit 1e151eb41cc3dcab348ce5d4717317a59cd6d8a2
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Wed Nov 20 23:56:26 2013 +0000
Small optimization
---
libyara/parser.c | 6 +-----
libyara/re.c | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/libyara/parser.c b/libyara/parser.c
index 2984fb4..8e1a04c 100644
--- a/libyara/parser.c
+++ b/libyara/parser.c
@@ -258,11 +258,7 @@ STRING* yr_parser_reduce_string_declaration(
string->g_flags = flags;
- for (i = 0; i < MAX_THREADS; i++)
- {
- string->matches[i].head = NULL;
- string->matches[i].tail = NULL;
- }
+ memset(string->matches, 0, sizeof(string->matches));
if (flags & STRING_GFLAGS_HEXADECIMAL ||
flags & STRING_GFLAGS_REGEXP)
diff --git a/libyara/re.c b/libyara/re.c
index ad9335f..642d63e 100644
--- a/libyara/re.c
+++ b/libyara/re.c
@@ -881,7 +881,6 @@ RE_STACK* _yr_re_clone_stack(
clon = _yr_re_alloc_stack(pool);
clon->top = stack->top;
- //TODO: replace with memcpy
for (int i = 0; i < clon->top; i++)
clon->items[i] = stack->items[i];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list