]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
log: log_append_logfile() add new error path 2584/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 4 Sep 2018 11:59:49 +0000 (13:59 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 4 Sep 2018 12:05:28 +0000 (14:05 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/log.c

index 2a7ee1eab923a2963c6d69738746112aa4b23250..dd15bdd5005dba109901b3c3339d03175db1ad3d 100644 (file)
@@ -311,7 +311,7 @@ static int log_append_logfile(const struct lxc_log_appender *appender,
                return 0;
 
        if (lxc_unix_epoch_to_utc(date_time, LXC_LOG_TIME_SIZE, &event->timestamp) < 0)
-               return 0;
+               return -1;
 
        n = snprintf(buffer, sizeof(buffer),
                     "%s%s%s %s %-8s %s - %s:%s:%d - ",