From: drh Date: Mon, 16 Aug 2010 14:17:59 +0000 (+0000) Subject: Add ALWAYS() macros in wal.c to cover branches that are no longer reachable X-Git-Tag: version-3.7.2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e9e70b17039c89133bcc707bddc5c0ac41b9523;p=thirdparty%2Fsqlite.git Add ALWAYS() macros in wal.c to cover branches that are no longer reachable following the pager refactoring. FossilOrigin-Name: 24f24c927c77bb3bb4d26a23dd5d94f964db8033 --- diff --git a/manifest b/manifest index 6d8c9d2cc3..d9367cd272 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C Adjustments\sfor\sbetter\s64K\spage\ssize\shandling. -D 2010-08-14T21:21:25 +C Add\sALWAYS()\smacros\sin\swal.c\sto\scover\sbranches\sthat\sare\sno\slonger\sreachable\nfollowing\sthe\spager\srefactoring. +D 2010-08-16T14:18:00 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -230,7 +230,7 @@ F src/vdbeblob.c 258a6010ba7a82b72b327fb24c55790655689256 F src/vdbemem.c e5673f81a2381b35c60e73ef0a8502be2ab1041e F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2 F src/vtab.c 0e8e0cb30dffb078367e843e84e37ef99236c7e4 -F src/wal.c c2d20c37c594e8d67facb273184fcd70e881bd02 +F src/wal.c 6b170507776d01e1af01d19762564b75f1e0c98d F src/wal.h 96669b645e27cd5a111ba59f0cae7743a207bc3c F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f F src/where.c 7db3e41c2a846f9deeb24f1bbb75461b4010b7b5 @@ -846,14 +846,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P db9539f2ceabd3c5a3eb5d4701f80f4e7da9344d -R 1a92e64b60334d2b1f13f1288894a05a +P faf1974e2de321bfefb68b81d702ae69771933ef +R d448d7a55c7f1edda8088cf8cf2f24b3 U drh -Z cb5fbd482dc54c48c890fe543adb260b +Z 0dbfc6c0fd736ea91ec08670fb6d2090 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFMZwjYoxKgR168RlERAuTTAKCAlGN4ms1osdDGqkAZEJOT1U/ayQCeKWVo -j5q8jHm2fn070zRuR44G9+w= -=r7zM +iD8DBQFMaUicoxKgR168RlERAqtPAJ97MonTPU5sZIrsJVkp01tYjFeJXACdFB90 +bjtppN7EGnG+XgMC6cgZQ8I= +=OPhy -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index 685cbbcb9f..255b758cca 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -faf1974e2de321bfefb68b81d702ae69771933ef \ No newline at end of file +24f24c927c77bb3bb4d26a23dd5d94f964db8033 \ No newline at end of file diff --git a/src/wal.c b/src/wal.c index 19fc53cbc9..07c1e2d2e7 100644 --- a/src/wal.c +++ b/src/wal.c @@ -2188,7 +2188,7 @@ int sqlite3WalRead( ** Return the size of the database in pages (or zero, if unknown). */ Pgno sqlite3WalDbsize(Wal *pWal){ - if( pWal && pWal->readLock>=0 ){ + if( pWal && ALWAYS(pWal->readLock>=0) ){ return pWal->hdr.nPage; } return 0; @@ -2267,7 +2267,7 @@ int sqlite3WalEndWriteTransaction(Wal *pWal){ */ int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx){ int rc = SQLITE_OK; - if( pWal->writeLock ){ + if( ALWAYS(pWal->writeLock) ){ Pgno iMax = pWal->hdr.mxFrame; Pgno iFrame;