1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add ALWAYS() macros in wal.c to cover branches that are no longer reachable

following the pager refactoring.

FossilOrigin-Name: 24f24c927c77bb3bb4d26a23dd5d94f964db8033
This commit is contained in:
drh
2010-08-16 14:17:59 +00:00
parent 9b78f79183
commit 7e9e70b170
3 changed files with 12 additions and 12 deletions

View File

@@ -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;