[Forensics-changes] [yara] 37/135: Remove unnecessary code
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:27:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.1.0
in repository yara.
commit fcc71e037f4b9ee76be2f6e391c1c32a06bc4d8e
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Thu Jul 3 12:08:12 2014 +0200
Remove unnecessary code
---
libyara/lexer.c | 3 +--
libyara/lexer.l | 3 +--
libyara/parser.c | 30 ------------------------------
libyara/rules.c | 2 --
4 files changed, 2 insertions(+), 36 deletions(-)
diff --git a/libyara/lexer.c b/libyara/lexer.c
index ae67e7e..0634c00 100644
--- a/libyara/lexer.c
+++ b/libyara/lexer.c
@@ -2957,7 +2957,6 @@ int yr_lex_parse_rules_string(
YR_COMPILER* compiler)
{
yyscan_t yyscanner;
- YY_BUFFER_STATE state;
if (setjmp(compiler->error_recovery) != 0)
return compiler->errors;
@@ -2968,7 +2967,7 @@ int yr_lex_parse_rules_string(
yara_yyset_extra(compiler,yyscanner);
- state = yara_yy_scan_string(rules_string,yyscanner);
+ yara_yy_scan_string(rules_string,yyscanner);
yara_yyset_lineno(1,yyscanner);
yyparse(yyscanner, compiler);
diff --git a/libyara/lexer.l b/libyara/lexer.l
index b849d6f..b546953 100644
--- a/libyara/lexer.l
+++ b/libyara/lexer.l
@@ -638,7 +638,6 @@ int yr_lex_parse_rules_string(
YR_COMPILER* compiler)
{
yyscan_t yyscanner;
- YY_BUFFER_STATE state;
if (setjmp(compiler->error_recovery) != 0)
return compiler->errors;
@@ -649,7 +648,7 @@ int yr_lex_parse_rules_string(
yyset_extra(compiler, yyscanner);
- state = yy_scan_string(rules_string, yyscanner);
+ yy_scan_string(rules_string, yyscanner);
yyset_lineno(1, yyscanner);
yyparse(yyscanner, compiler);
diff --git a/libyara/parser.c b/libyara/parser.c
index ac71451..17ee689 100644
--- a/libyara/parser.c
+++ b/libyara/parser.c
@@ -256,36 +256,6 @@ int yr_parser_lookup_loop_variable(
}
-/*
-YR_EXTERNAL_VARIABLE* yr_parser_lookup_external_variable(
- yyscan_t yyscanner,
- const char* identifier)
-{
- YR_EXTERNAL_VARIABLE* external;
- YR_COMPILER* compiler = yyget_extra(yyscanner);
- int i;
-
- external = (YR_EXTERNAL_VARIABLE*) yr_arena_base_address(
- compiler->externals_arena);
-
- for (i = 0; i < compiler->externals_count; i++)
- {
- if (strcmp(external->identifier, identifier) == 0)
- return external;
-
- external = yr_arena_next_address(
- compiler->externals_arena,
- external,
- sizeof(YR_EXTERNAL_VARIABLE));
- }
-
- yr_compiler_set_error_extra_info(compiler, identifier);
- compiler->last_result = ERROR_UNDEFINED_IDENTIFIER;
-
- return NULL;
-}
-*/
-
int _yr_parser_write_string(
const char* identifier,
int flags,
diff --git a/libyara/rules.c b/libyara/rules.c
index 04d9ee8..a13a381 100644
--- a/libyara/rules.c
+++ b/libyara/rules.c
@@ -608,7 +608,6 @@ int yr_rules_load(
{
YR_RULES* new_rules;
YARA_RULES_FILE_HEADER* header;
- YR_RULE* rule;
int result;
@@ -644,7 +643,6 @@ int yr_rules_load(
return ERROR_INTERNAL_FATAL_ERROR;
#endif
- rule = new_rules->rules_list_head;
*rules = new_rules;
return ERROR_SUCCESS;
--
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