Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-02-24 12:33:00 +0300
committerJunio C Hamano <gitster@pobox.com>2022-02-25 02:58:55 +0300
commit4996e0b015bd1dbb921bc359438e1385e7c87fd7 (patch)
treea4589a638a3bd66202bfa14bac7ff9c276c5783e /trace2/tr2_tgt_normal.c
parent98593057d0caee3432d170f4b895ef7bcf27fbd0 (diff)
trace2: use designated initializers for "struct tr2_dst"
Convert the "static struct tr2_dst" assignments in trace2/* to use designated initializers. I don't think it improves readability to include the explicit 0-ing out of the fd/initialized/need_close/too_many_files members, so let's have those be initialized implicitly by the compiler. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace2/tr2_tgt_normal.c')
-rw-r--r--trace2/tr2_tgt_normal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/trace2/tr2_tgt_normal.c b/trace2/tr2_tgt_normal.c
index c799265001..c42fbade7f 100644
--- a/trace2/tr2_tgt_normal.c
+++ b/trace2/tr2_tgt_normal.c
@@ -9,7 +9,9 @@
#include "trace2/tr2_tgt.h"
#include "trace2/tr2_tls.h"
-static struct tr2_dst tr2dst_normal = { TR2_SYSENV_NORMAL, 0, 0, 0, 0 };
+static struct tr2_dst tr2dst_normal = {
+ .sysenv_var = TR2_SYSENV_NORMAL,
+};
/*
* Use the TR2_SYSENV_NORMAL_BRIEF setting to omit the "<time> <file>:<line>"