[Forensics-changes] [yara] 45/192: Fix variable redefinition (#529)

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:31:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.6.0
in repository yara.

commit a0bb3836f16e3c5d0c2a1da097a1ebacbebc3a94
Author: Lennart Espe <lennart at mooxmirror.io>
Date:   Wed Sep 28 14:44:16 2016 +0200

    Fix variable redefinition (#529)
    
    * Fix variable redefinition
    
    Variable `i` was declared multiple times in the same scope
    
    * moved i up to the start of main
---
 yara.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/yara.c b/yara.c
index c489f67..efd5f6b 100644
--- a/yara.c
+++ b/yara.c
@@ -987,7 +987,7 @@ int main(
   YR_COMPILER* compiler = NULL;
   YR_RULES* rules = NULL;
 
-  int result;
+  int result, i;
 
   argc = args_parse(options, argc, argv);
 
@@ -1158,7 +1158,7 @@ int main(
     thread_args.rules = rules;
     thread_args.start_time = start_time;
 
-    for (int i = 0; i < threads; i++)
+    for (i = 0; i < threads; i++)
     {
       if (create_thread(&thread[i], scanning_thread, (void*) &thread_args))
       {
@@ -1177,7 +1177,7 @@ int main(
     file_queue_finish();
 
     // Wait for scan threads to finish
-    for (int i = 0; i < threads; i++)
+    for (i = 0; i < threads; i++)
       thread_join(&thread[i]);
 
     file_queue_destroy();

-- 
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