s3:debug: use struct initializer
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Thu, 11 Apr 2019 11:01:16 +0000 (13:01 +0200)
committerChristof Schmitt <cs@samba.org>
Thu, 18 Apr 2019 20:38:23 +0000 (20:38 +0000)
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>
lib/util/debug_s3.c

index 479348a..3792af5 100644 (file)
 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());
        }