Bug #19 ยป 0001-bug-19-patch.patch
| src/util-debug.c | ||
|---|---|---|
|
char *temp = *msg;
|
||
|
const char *s = NULL;
|
||
|
struct timeval tval;
|
||
|
struct tm *tms;
|
||
|
time_t tval;
|
||
|
struct tm *tms = NULL;
|
||
|
/* no of characters_written(cw) by sprintf */
|
||
|
int cw = 0;
|
||
| ... | ... | |
|
case SC_LOG_FMT_TIME:
|
||
|
temp_fmt[0] = '\0';
|
||
|
gettimeofday(&tval, NULL);
|
||
|
tms = (struct tm *)localtime(&tval.tv_sec);
|
||
|
time(&tval);
|
||
|
tms = localtime(&tval);
|
||
|
cw = snprintf(temp, SC_LOG_MAX_LOG_MSG_LEN,
|
||
|
"%s%d/%d/%04d -- %02d:%02d:%02d",
|
||
|
substr, tms->tm_mday, tms->tm_mon,
|
||
|
substr, tms->tm_mday, tms->tm_mon + 1,
|
||
|
tms->tm_year + 1900, tms->tm_hour, tms->tm_min,
|
||
|
tms->tm_sec);
|
||
|
if (cw < 0)
|
||