diff mbox series

[v1,5/6] refs/debug: declare file-local variable to be static

Message ID 20210731024221.2113906-6-mathstuf@gmail.com (mailing list archive)
State New, archived
Headers show
Series globals: clean up some global usages | expand

Commit Message

Ben Boeckel July 31, 2021, 2:42 a.m. UTC
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 mbox series

Patch

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,