]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Omit unnecessary branches from the unixIsSharingShmNode() implementation.
authordrh <>
Mon, 27 Oct 2025 23:57:57 +0000 (23:57 +0000)
committerdrh <>
Mon, 27 Oct 2025 23:57:57 +0000 (23:57 +0000)
FossilOrigin-Name: 2d5623bc27073c407ec63e401f095d12f0025dd276a0bdc26d8b94b1f13c9a36

manifest
manifest.uuid
src/os_unix.c

index 75f0880e9731b20e3fd45e4a177efad2d5002799..eec002102bf1f8cec75d145e8b95fba84e46daed 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C The\sunixIsSharingShmNode()\sfunction\sshould\salways\sreturn\sfalse\sfor\sthe\nunix-excl\sVFS.
-D 2025-10-27T15:44:16.709
+C Omit\sunnecessary\sbranches\sfrom\sthe\sunixIsSharingShmNode()\simplementation.
+D 2025-10-27T23:57:57.385
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -720,7 +720,7 @@ F src/os.h 1ff5ae51d339d0e30d8a9d814f4b8f8e448169304d83a7ed9db66a65732f3e63
 F src/os_common.h 6c0eb8dd40ef3e12fe585a13e709710267a258e2c8dd1c40b1948a1d14582e06
 F src/os_kv.c fb7ba8d6204197357f1eb7e1c7450d09c10043bf7e99aba602f4aa46b8fb11a3
 F src/os_setup.h 8efc64eda6a6c2f221387eefc2e7e45fd5a3d5c8337a7a83519ba4fbd2957ae2
-F src/os_unix.c cfd113c764b70342e1946d9fa5e9f3d308fa3e4ccdbd75295e96926fffd5eb52
+F src/os_unix.c 46cf48c94280f44e98a58f366b81e27c736b50965a6b72f1099fdb5510f25059
 F src/os_win.c 27617f334168644b542c9d58ac6e5f051b318136273e78d243384b4eca2df6b3
 F src/os_win.h 4c247cdb6d407c75186c94a1e84d5a22cbae4adcec93fcae8d2bc1f956fd1f19
 F src/pager.c 113f9149092ccff6cf90e97c2611200e5a237f13d26c394bc9fd933377852764
@@ -2171,8 +2171,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P ed1b9206640f66cb8abff444809ccab8a4a5157b5c90e9aacddc422210e63423
-R 76af13af3966faeb041abb063cdebfea
+P 770f35dae47a98554b18f8a7aa9f6b6e39ae2b3aa8dce8d75b5bed0c6f0f9c21
+R 791629cb568e467eb93c82221228da42
 U drh
-Z 53325053b0059fe0d79a20e4dca5544a
+Z 69e8ca72e4bfcc61d73eb0cfe53aa547
 # Remove this line to create a well-formed Fossil manifest.
index 188678901e31070615ccadb1e0187901f865381b..b0918c7e64ebd4055319e9edee3e221d4f3f559e 100644 (file)
@@ -1 +1 @@
-770f35dae47a98554b18f8a7aa9f6b6e39ae2b3aa8dce8d75b5bed0c6f0f9c21
+2d5623bc27073c407ec63e401f095d12f0025dd276a0bdc26d8b94b1f13c9a36
index dc6875f47e34cc0802c40086f36838fba3cb6908..0a46fc7cfa254bd126e3631810e2cbaf5b36630d 100644 (file)
@@ -4660,13 +4660,14 @@ static int unixIsSharingShmNode(unixFile *pFile){
   pShmNode = pFile->pShm->pShmNode;
   rc = 1;
   unixEnterMutex();
-  if( pShmNode->nRef==1 ){
+  if( ALWAYS(pShmNode->nRef==1) ){
     struct flock lock;
     lock.l_whence = SEEK_SET;
     lock.l_start = UNIX_SHM_DMS;
     lock.l_len = 1;
     lock.l_type = F_WRLCK;
-    if( osFcntl(pShmNode->hShm, F_GETLK, &lock)==0 && lock.l_type==F_UNLCK ){
+    osFcntl(pShmNode->hShm, F_GETLK, &lock);
+    if( lock.l_type==F_UNLCK ){
       rc = 0;
     }
   }