From: Martin Mares Date: Thu, 26 Jun 2014 13:47:10 +0000 (+0200) Subject: Logger: Fixed use of unitialized flags X-Git-Tag: v6.1~16^2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=34cb2b0143a1df0cde5edeb5e952db30e85ee987;p=libucw.git Logger: Fixed use of unitialized flags --- diff --git a/ucw/log-file.c b/ucw/log-file.c index 2693269d..40f1f396 100644 --- a/ucw/log-file.c +++ b/ucw/log-file.c @@ -130,10 +130,10 @@ log_new_file(const char *path, uint flags) struct log_stream *ls = log_new_stream(sizeof(struct file_stream)); struct file_stream *fs = (struct file_stream *) ls; fs->fd = -1; + fs->flags = FF_CLOSE_FD | flags; fs->orig_name = xstrdup(path); if (strchr(path, '%')) - fs->flags = FF_FORMAT_NAME; - fs->flags |= FF_CLOSE_FD | flags; + fs->flags |= FF_FORMAT_NAME; ls->msgfmt = LSFMT_DEFAULT; ls->handler = file_handler; ls->close = file_close;