View | Details | Raw Unified | Return to bug 248249
Collapse All | Expand All

(-)files/patch-lib_zlog.c (+16 lines)
Line 0 Link Here
1
--- lib/zlog.c.orig	2020-06-30 11:08:57 UTC
2
+++ lib/zlog.c
3
@@ -246,10 +246,10 @@ void zlog_tls_buffer_init(void)
4
 	fchown(mmfd, zlog_uid, zlog_gid);
5
 
6
 #ifdef HAVE_POSIX_FALLOCATE
7
-	if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) < 0) {
8
-#else
9
-	if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
10
+	if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) != 0)
11
+	/* note next statement is under above if() */
12
 #endif
13
+	if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
14
 		zlog_err("failed to allocate thread log buffer \"%s\": %s",
15
 			 mmpath, strerror(errno));
16
 		goto out_anon_unlink;

Return to bug 248249