From: Ben Boeckel <mathstuf@gmail.com>
To: git@vger.kernel.org
Cc: "Ben Boeckel" <mathstuf@gmail.com>, "Jeff King" <peff@peff.net>,
"Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH v1 6/6] globals: remove explicit `0` initialization from globals
Date: Fri, 30 Jul 2021 22:42:21 -0400 [thread overview]
Message-ID: <20210731024221.2113906-7-mathstuf@gmail.com> (raw)
In-Reply-To: <20210731024221.2113906-1-mathstuf@gmail.com>
Git relies on implicit zero-initialization of global variables.
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
---
object-file.c | 2 +-
progress.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/object-file.c b/object-file.c
index ecca5a8da0..6a04013342 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1503,7 +1503,7 @@ static int loose_object_info(struct repository *r,
return (status < 0) ? status : 0;
}
-int obj_read_use_lock = 0;
+int obj_read_use_lock;
pthread_mutex_t obj_read_mutex;
void enable_obj_read_lock(void)
diff --git a/progress.c b/progress.c
index 680c6a8bf9..4fb4233b67 100644
--- a/progress.c
+++ b/progress.c
@@ -52,7 +52,7 @@ static volatile sig_atomic_t progress_update;
* for 'test-tool progress'.
*/
int progress_testing;
-uint64_t progress_test_ns = 0;
+uint64_t progress_test_ns;
void progress_test_force_update(void)
{
progress_update = 1;
--
2.31.1
prev parent reply other threads:[~2021-07-31 2:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-31 2:42 [PATCH v1 0/6] globals: clean up some global usages Ben Boeckel
2021-07-31 2:42 ` [PATCH v1 1/6] branch: move `git_default_branch_config` to `branch.c` Ben Boeckel
2021-07-31 2:42 ` [PATCH v1 2/6] mailmap: move `git_default_mailmap_config` to `mailmap.c` Ben Boeckel
2021-07-31 2:42 ` [PATCH v1 3/6] apply: move `apply_default_*whitespace` to `apply.c` Ben Boeckel
2021-07-31 2:42 ` [PATCH v1 4/6] config: remove `core_compression_level` Ben Boeckel
2021-07-31 2:42 ` [PATCH v1 5/6] refs/debug: declare file-local variable to be static Ben Boeckel
2021-07-31 2:42 ` Ben Boeckel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210731024221.2113906-7-mathstuf@gmail.com \
--to=mathstuf@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).