[Forensics-changes] [yara] 140/192: Declare as “static” global variables used within a single source file
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:31:57 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 657a3acff9e0ba45a9607b3738a04638507adeb7
Author: Victor Manuel Alvarez <vmalvarez at vmalvarez-macbookpro.roam.corp.google.com>
Date: Thu Apr 20 18:15:45 2017 +0200
Declare as “static” global variables used within a single source file
---
libyara/libyara.c | 2 +-
yara.c | 48 +++++++++++++++++++++++-------------------------
yarac.c | 10 +++++-----
3 files changed, 29 insertions(+), 31 deletions(-)
diff --git a/libyara/libyara.c b/libyara/libyara.c
index 16b248a..7600212 100644
--- a/libyara/libyara.c
+++ b/libyara/libyara.c
@@ -77,7 +77,7 @@ char altercase[256];
// to be thread-safe. These locks are initialized in yr_initialize
// function.
-YR_MUTEX *openssl_locks;
+static YR_MUTEX *openssl_locks;
unsigned long thread_id(void)
diff --git a/yara.c b/yara.c
index 9400cbd..ded53fd 100644
--- a/yara.c
+++ b/yara.c
@@ -111,31 +111,29 @@ typedef struct COMPILER_RESULTS
#define MAX_ARGS_EXT_VAR 32
#define MAX_ARGS_MODULE_DATA 32
-char* tags[MAX_ARGS_TAG + 1];
-char* identifiers[MAX_ARGS_IDENTIFIER + 1];
-char* ext_vars[MAX_ARGS_EXT_VAR + 1];
-char* modules_data[MAX_ARGS_EXT_VAR + 1];
-
-int recursive_search = FALSE;
-int show_module_data = FALSE;
-int show_tags = FALSE;
-int show_specified_tags = FALSE;
-int show_specified_rules = FALSE;
-int show_strings = FALSE;
-int show_string_length = FALSE;
-int show_meta = FALSE;
-int show_namespace = FALSE;
-int show_version = FALSE;
-int show_help = FALSE;
-int ignore_warnings = FALSE;
-int fast_scan = FALSE;
-int negate = FALSE;
-int count = 0;
-int limit = 0;
-int timeout = 1000000;
-int stack_size = DEFAULT_STACK_SIZE;
-int threads = 8;
-int fail_on_warnings = FALSE;
+static char* tags[MAX_ARGS_TAG + 1];
+static char* identifiers[MAX_ARGS_IDENTIFIER + 1];
+static char* ext_vars[MAX_ARGS_EXT_VAR + 1];
+static char* modules_data[MAX_ARGS_EXT_VAR + 1];
+
+static int recursive_search = FALSE;
+static int show_module_data = FALSE;
+static int show_tags = FALSE;
+static int show_strings = FALSE;
+static int show_string_length = FALSE;
+static int show_meta = FALSE;
+static int show_namespace = FALSE;
+static int show_version = FALSE;
+static int show_help = FALSE;
+static int ignore_warnings = FALSE;
+static int fast_scan = FALSE;
+static int negate = FALSE;
+static int count = 0;
+static int limit = 0;
+static int timeout = 1000000;
+static int stack_size = DEFAULT_STACK_SIZE;
+static int threads = 8;
+static int fail_on_warnings = FALSE;
#define USAGE_STRING \
diff --git a/yarac.c b/yarac.c
index 4a05dc0..35a3246 100644
--- a/yarac.c
+++ b/yarac.c
@@ -64,11 +64,11 @@ typedef struct COMPILER_RESULTS
} COMPILER_RESULTS;
-char* ext_vars[MAX_ARGS_EXT_VAR + 1];
-int ignore_warnings = FALSE;
-int show_version = FALSE;
-int show_help = FALSE;
-int fail_on_warnings = FALSE;
+static char* ext_vars[MAX_ARGS_EXT_VAR + 1];
+static int ignore_warnings = FALSE;
+static int show_version = FALSE;
+static int show_help = FALSE;
+static int fail_on_warnings = FALSE;
#define USAGE_STRING \
--
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