Thread (16 messages) flat view 16 messages, 6 authors, 2021-07-10
STALE1862d

[PATCH 3/5] config: trivial struct initialization cleanup

From: Felipe Contreras <hidden>
Date: 2021-07-02 10:05:18
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Felipe Contreras <redacted>
---
 config.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/config.c b/config.c
index dc896c434e..9172c96c54 100644
--- a/config.c
+++ b/config.c
@@ -2265,11 +2265,11 @@ int git_configset_get_pathname(struct config_set *cs, const char *key, const cha
 /* Functions use to read configuration from a repository */
 static void repo_read_config(struct repository *repo)
 {
-	struct config_options opts = { 0 };
-
-	opts.respect_includes = 1;
-	opts.commondir = repo->commondir;
-	opts.git_dir = repo->gitdir;
+	struct config_options opts = {
+		.respect_includes = 1,
+		.commondir = repo->commondir,
+		.git_dir = repo->gitdir,
+	};
 
 	if (!repo->config)
 		CALLOC_ARRAY(repo->config, 1);
-- 
2.32.0.94.g4574ca548c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help