File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ static int manager_read_journal_input(Manager *m) {
121121 structured_data_len = 0 , msgid_len = 0 , pid_len = 0 ;
122122 unsigned sev = JOURNAL_DEFAULT_SEVERITY ;
123123 unsigned fac = JOURNAL_DEFAULT_FACILITY ;
124- struct timeval tv ;
124+ struct timeval tv , * tvp = NULL ;
125125 const void * data ;
126126 usec_t realtime ;
127127 size_t length ;
@@ -169,8 +169,11 @@ static int manager_read_journal_input(Manager *m) {
169169 if (r < 0 )
170170 log_warning_errno (r , "Failed to rerieve realtime from journal: %m" );
171171 else {
172- tv .tv_sec = realtime / USEC_PER_SEC ;
173- tv .tv_usec = realtime % USEC_PER_SEC ;
172+ tv = (struct timeval ) {
173+ .tv_sec = realtime / USEC_PER_SEC ,
174+ .tv_usec = realtime % USEC_PER_SEC ,
175+ };
176+ tvp = & tv ;
174177 }
175178
176179 if (facility ) {
@@ -197,7 +200,7 @@ static int manager_read_journal_input(Manager *m) {
197200 identifier ,
198201 message , hostname ,
199202 pid ,
200- r >= 0 ? & tv : NULL ,
203+ tvp ,
201204 structured_data ,
202205 m -> syslog_msgid ? msgid : NULL );
203206}
You can’t perform that action at this time.
0 commit comments