trace2: use designated initializers for "struct tr2_tgt"

As with the preceding commit, change another set of file-level struct
assignments to use designated initializers.

As before the "= NULL" assignments are redundant, but we're keeping
them for self-documentation purposes. The comments left to explain the
pre-image can now be removed in favor of working code that relays the
same information to the reader.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2022-02-24 10:32:59 +01:00 committed by Junio C Hamano
parent 518f7059a8
commit 98593057d0
3 changed files with 84 additions and 84 deletions

View File

@ -613,34 +613,34 @@ static void fn_data_json_fl(const char *file, int line,
} }
struct tr2_tgt tr2_tgt_event = { struct tr2_tgt tr2_tgt_event = {
&tr2dst_event, .pdst = &tr2dst_event,
fn_init, .pfn_init = fn_init,
fn_term, .pfn_term = fn_term,
fn_version_fl, .pfn_version_fl = fn_version_fl,
fn_start_fl, .pfn_start_fl = fn_start_fl,
fn_exit_fl, .pfn_exit_fl = fn_exit_fl,
fn_signal, .pfn_signal = fn_signal,
fn_atexit, .pfn_atexit = fn_atexit,
fn_error_va_fl, .pfn_error_va_fl = fn_error_va_fl,
fn_command_path_fl, .pfn_command_path_fl = fn_command_path_fl,
fn_command_ancestry_fl, .pfn_command_ancestry_fl = fn_command_ancestry_fl,
fn_command_name_fl, .pfn_command_name_fl = fn_command_name_fl,
fn_command_mode_fl, .pfn_command_mode_fl = fn_command_mode_fl,
fn_alias_fl, .pfn_alias_fl = fn_alias_fl,
fn_child_start_fl, .pfn_child_start_fl = fn_child_start_fl,
fn_child_exit_fl, .pfn_child_exit_fl = fn_child_exit_fl,
fn_child_ready_fl, .pfn_child_ready_fl = fn_child_ready_fl,
fn_thread_start_fl, .pfn_thread_start_fl = fn_thread_start_fl,
fn_thread_exit_fl, .pfn_thread_exit_fl = fn_thread_exit_fl,
fn_exec_fl, .pfn_exec_fl = fn_exec_fl,
fn_exec_result_fl, .pfn_exec_result_fl = fn_exec_result_fl,
fn_param_fl, .pfn_param_fl = fn_param_fl,
fn_repo_fl, .pfn_repo_fl = fn_repo_fl,
fn_region_enter_printf_va_fl, .pfn_region_enter_printf_va_fl = fn_region_enter_printf_va_fl,
fn_region_leave_printf_va_fl, .pfn_region_leave_printf_va_fl = fn_region_leave_printf_va_fl,
fn_data_fl, .pfn_data_fl = fn_data_fl,
fn_data_json_fl, .pfn_data_json_fl = fn_data_json_fl,
NULL, /* printf */ .pfn_printf_va_fl = NULL,
}; };

View File

@ -325,34 +325,34 @@ static void fn_printf_va_fl(const char *file, int line,
} }
struct tr2_tgt tr2_tgt_normal = { struct tr2_tgt tr2_tgt_normal = {
&tr2dst_normal, .pdst = &tr2dst_normal,
fn_init, .pfn_init = fn_init,
fn_term, .pfn_term = fn_term,
fn_version_fl, .pfn_version_fl = fn_version_fl,
fn_start_fl, .pfn_start_fl = fn_start_fl,
fn_exit_fl, .pfn_exit_fl = fn_exit_fl,
fn_signal, .pfn_signal = fn_signal,
fn_atexit, .pfn_atexit = fn_atexit,
fn_error_va_fl, .pfn_error_va_fl = fn_error_va_fl,
fn_command_path_fl, .pfn_command_path_fl = fn_command_path_fl,
fn_command_ancestry_fl, .pfn_command_ancestry_fl = fn_command_ancestry_fl,
fn_command_name_fl, .pfn_command_name_fl = fn_command_name_fl,
fn_command_mode_fl, .pfn_command_mode_fl = fn_command_mode_fl,
fn_alias_fl, .pfn_alias_fl = fn_alias_fl,
fn_child_start_fl, .pfn_child_start_fl = fn_child_start_fl,
fn_child_exit_fl, .pfn_child_exit_fl = fn_child_exit_fl,
fn_child_ready_fl, .pfn_child_ready_fl = fn_child_ready_fl,
NULL, /* thread_start */ .pfn_thread_start_fl = NULL,
NULL, /* thread_exit */ .pfn_thread_exit_fl = NULL,
fn_exec_fl, .pfn_exec_fl = fn_exec_fl,
fn_exec_result_fl, .pfn_exec_result_fl = fn_exec_result_fl,
fn_param_fl, .pfn_param_fl = fn_param_fl,
fn_repo_fl, .pfn_repo_fl = fn_repo_fl,
NULL, /* region_enter */ .pfn_region_enter_printf_va_fl = NULL,
NULL, /* region_leave */ .pfn_region_leave_printf_va_fl = NULL,
NULL, /* data */ .pfn_data_fl = NULL,
NULL, /* data_json */ .pfn_data_json_fl = NULL,
fn_printf_va_fl, .pfn_printf_va_fl = fn_printf_va_fl,
}; };

View File

@ -549,34 +549,34 @@ static void fn_printf_va_fl(const char *file, int line,
} }
struct tr2_tgt tr2_tgt_perf = { struct tr2_tgt tr2_tgt_perf = {
&tr2dst_perf, .pdst = &tr2dst_perf,
fn_init, .pfn_init = fn_init,
fn_term, .pfn_term = fn_term,
fn_version_fl, .pfn_version_fl = fn_version_fl,
fn_start_fl, .pfn_start_fl = fn_start_fl,
fn_exit_fl, .pfn_exit_fl = fn_exit_fl,
fn_signal, .pfn_signal = fn_signal,
fn_atexit, .pfn_atexit = fn_atexit,
fn_error_va_fl, .pfn_error_va_fl = fn_error_va_fl,
fn_command_path_fl, .pfn_command_path_fl = fn_command_path_fl,
fn_command_ancestry_fl, .pfn_command_ancestry_fl = fn_command_ancestry_fl,
fn_command_name_fl, .pfn_command_name_fl = fn_command_name_fl,
fn_command_mode_fl, .pfn_command_mode_fl = fn_command_mode_fl,
fn_alias_fl, .pfn_alias_fl = fn_alias_fl,
fn_child_start_fl, .pfn_child_start_fl = fn_child_start_fl,
fn_child_exit_fl, .pfn_child_exit_fl = fn_child_exit_fl,
fn_child_ready_fl, .pfn_child_ready_fl = fn_child_ready_fl,
fn_thread_start_fl, .pfn_thread_start_fl = fn_thread_start_fl,
fn_thread_exit_fl, .pfn_thread_exit_fl = fn_thread_exit_fl,
fn_exec_fl, .pfn_exec_fl = fn_exec_fl,
fn_exec_result_fl, .pfn_exec_result_fl = fn_exec_result_fl,
fn_param_fl, .pfn_param_fl = fn_param_fl,
fn_repo_fl, .pfn_repo_fl = fn_repo_fl,
fn_region_enter_printf_va_fl, .pfn_region_enter_printf_va_fl = fn_region_enter_printf_va_fl,
fn_region_leave_printf_va_fl, .pfn_region_leave_printf_va_fl = fn_region_leave_printf_va_fl,
fn_data_fl, .pfn_data_fl = fn_data_fl,
fn_data_json_fl, .pfn_data_json_fl = fn_data_json_fl,
fn_printf_va_fl, .pfn_printf_va_fl = fn_printf_va_fl,
}; };