[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: [PATCH v1 5/6] refs/debug: declare file-local variable to be static
From: Ben Boeckel <mathstuf () gmail ! com>
Date: 2021-07-31 2:42:20
Message-ID: 20210731024221.2113906-6-mathstuf () gmail ! com
[Download RAW message or body]
Declaring a variable in a source file as `extern` and then defining it
later is not very useful. It can instead be declared as `static`.
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
---
refs/debug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/refs/debug.c b/refs/debug.c
index 7db4abccc3..f5609408f3 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -9,7 +9,7 @@ struct debug_ref_store {
struct ref_store *refs;
};
-extern struct ref_storage_be refs_be_debug;
+static struct ref_storage_be refs_be_debug;
struct ref_store *maybe_debug_wrap_ref_store(const char *gitdir, struct ref_store *store)
{
@@ -413,7 +413,7 @@ static int debug_reflog_expire(struct ref_store *ref_store, const char *refname,
return res;
}
-struct ref_storage_be refs_be_debug = {
+static struct ref_storage_be refs_be_debug = {
NULL,
"debug",
NULL,
--
2.31.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic