comparison svr-session.c @ 1219:84cf9062718d coverity

merge
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Dec 2015 22:24:34 +0800
parents d058e15ea213
children 888e3d17e962
comparison
equal deleted inserted replaced
1196:a29559086628 1219:84cf9062718d
202 int havetrace = 0; 202 int havetrace = 0;
203 203
204 vsnprintf(printbuf, sizeof(printbuf), format, param); 204 vsnprintf(printbuf, sizeof(printbuf), format, param);
205 205
206 #ifndef DISABLE_SYSLOG 206 #ifndef DISABLE_SYSLOG
207 if (svr_opts.usingsyslog) { 207 if (opts.usingsyslog) {
208 syslog(priority, "%s", printbuf); 208 syslog(priority, "%s", printbuf);
209 } 209 }
210 #endif 210 #endif
211 211
212 /* if we are using DEBUG_TRACE, we want to print to stderr even if 212 /* if we are using DEBUG_TRACE, we want to print to stderr even if
213 * syslog is used, so it is included in error reports */ 213 * syslog is used, so it is included in error reports */
214 #ifdef DEBUG_TRACE 214 #ifdef DEBUG_TRACE
215 havetrace = debug_trace; 215 havetrace = debug_trace;
216 #endif 216 #endif
217 217
218 if (!svr_opts.usingsyslog || havetrace) 218 if (!opts.usingsyslog || havetrace) {
219 {
220 struct tm * local_tm = NULL; 219 struct tm * local_tm = NULL;
221 timesec = time(NULL); 220 timesec = time(NULL);
222 local_tm = localtime(&timesec); 221 local_tm = localtime(&timesec);
223 if (local_tm == NULL 222 if (local_tm == NULL
224 || strftime(datestr, sizeof(datestr), "%b %d %H:%M:%S", 223 || strftime(datestr, sizeof(datestr), "%b %d %H:%M:%S",