Skip to content

Commit

Permalink
lib/zlog: fix coverity warning
Browse files Browse the repository at this point in the history
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
  • Loading branch information
eqvinox committed Apr 20, 2020
1 parent 73f079b commit 4105169
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/zlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,12 @@ void zlog_tls_buffer_init(void)

mmfd = openat(zlog_tmpdirfd, mmpath,
O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC, 0600);
fchown(mmfd, zlog_uid, zlog_gid);

if (mmfd < 0) {
zlog_err("failed to open thread log buffer \"%s\": %s",
mmpath, strerror(errno));
goto out_anon;
}
fchown(mmfd, zlog_uid, zlog_gid);

#ifdef HAVE_POSIX_FALLOCATE
if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) < 0) {
Expand Down

0 comments on commit 4105169

Please sign in to comment.