From 0941319940e5b52d81a3b82daffeb2b2048f029c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Mon, 26 Dec 2022 20:30:32 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=BF=D0=B0=D1=80=D0=BE=D1=87=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B5=D0=B7=D0=BD=D0=B0=D1=87=D0=B8=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D1=8B=D1=85=20likely.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/osal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osal.c b/src/osal.c index 8a76d865..997b9adf 100644 --- a/src/osal.c +++ b/src/osal.c @@ -1571,7 +1571,7 @@ MDBX_INTERNAL_FUNC int osal_fsync(mdbx_filehandle_t fd, return MDBX_SUCCESS /* nothing to do */; #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 case MDBX_SYNC_DATA: - if (fdatasync(fd) == 0) + if (likely(fdatasync(fd) == 0)) return MDBX_SUCCESS; break /* error */; #if defined(__linux__) || defined(__gnu_linux__) @@ -1581,7 +1581,7 @@ MDBX_INTERNAL_FUNC int osal_fsync(mdbx_filehandle_t fd, #endif /* Linux */ #endif /* _POSIX_SYNCHRONIZED_IO > 0 */ default: - if (fsync(fd) == 0) + if (likely(fsync(fd) == 0)) return MDBX_SUCCESS; }