[Forensics-changes] [yara] 311/407: Fix warning due to declaration inside switch statement

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:39 UTC 2017


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

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

commit 9890eb4b6545e0a935f17e72bc2bb58e48d99847
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Mon Jan 5 11:10:27 2015 +0100

    Fix warning due to declaration inside switch statement
---
 libyara/exec.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/libyara/exec.c b/libyara/exec.c
index dc49e28..e31610b 100644
--- a/libyara/exec.c
+++ b/libyara/exec.c
@@ -991,27 +991,27 @@ int yr_execute_code(
         ensure_defined(r1);
         ensure_defined(r2);
 
-        int r = sized_string_cmp(r1.ss, r2.ss);
+        result = sized_string_cmp(r1.ss, r2.ss);
 
         switch(*ip)
         {
           case OP_STR_EQ:
-            r1.i = (r == 0);
+            r1.i = (result == 0);
             break;
           case OP_STR_NEQ:
-            r1.i = (r != 0);
+            r1.i = (result != 0);
             break;
           case OP_STR_LT:
-            r1.i = (r < 0);
+            r1.i = (result < 0);
             break;
           case OP_STR_LE:
-            r1.i = (r <= 0);
+            r1.i = (result <= 0);
             break;
           case OP_STR_GT:
-            r1.i = (r > 0);
+            r1.i = (result > 0);
             break;
           case OP_STR_GE:
-            r1.i = (r >= 0);
+            r1.i = (result >= 0);
             break;
         }
 

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