.types = ~0U,
.msgfmt = LSFMT_DEFAULT,
// an empty clist
- .substreams.head.next = (cnode *) &log_stream_default.substreams.head,
- .substreams.head.prev = (cnode *) &log_stream_default.substreams.head,
+ .substreams.head = {
+ .next = (cnode *) &log_stream_default.substreams.head,
+ .prev = (cnode *) &log_stream_default.substreams.head,
+ },
};
/*** Registry of streams and their identifiers ***/
{
/* CAVEAT: These calls are not safe in signal handlers. */
gettimeofday(&tv, NULL);
+ m.tv = &tv;
if (localtime_r(&tv.tv_sec, &tm))
m.tm = &tm;
}
p = m.raw_msg;
while (*p)
{
- if (*p < 0x20 && *p != '\t')
+ if (*p >= 0 && *p < 0x20 && *p != '\t')
*p = 0x7f;
p++;
}