1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

s3:debug: use struct initializer

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13904

Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
This commit is contained in:
Ralph Wuerthner 2019-04-11 13:01:16 +02:00 committed by Christof Schmitt
parent f708272350
commit b9e1b4ad00

View File

@ -31,19 +31,18 @@
bool reopen_logs(void)
{
if (lp_loaded()) {
struct debug_settings settings;
struct debug_settings settings = {
.max_log_size = lp_max_log_size(),
.timestamp_logs = lp_timestamp_logs(),
.debug_prefix_timestamp = lp_debug_prefix_timestamp(),
.debug_hires_timestamp = lp_debug_hires_timestamp(),
.debug_pid = lp_debug_pid(),
.debug_uid = lp_debug_uid(),
.debug_class = lp_debug_class(),
};
debug_set_logfile(lp_logfile(talloc_tos()));
debug_parse_levels(lp_log_level(talloc_tos()));
ZERO_STRUCT(settings);
settings.max_log_size = lp_max_log_size();
settings.timestamp_logs = lp_timestamp_logs();
settings.debug_prefix_timestamp = lp_debug_prefix_timestamp();
settings.debug_hires_timestamp = lp_debug_hires_timestamp();
settings.debug_pid = lp_debug_pid();
settings.debug_uid = lp_debug_uid();
settings.debug_class = lp_debug_class();
debug_set_settings(&settings, lp_logging(talloc_tos()),
lp_syslog(), lp_syslog_only());
}