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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user