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

Remove an always-true conditional. Replace it with an assert().

FossilOrigin-Name: 1c2f0f8477bcf251fe874a2cfae4d7a403cb88ff
This commit is contained in:
drh
2011-04-09 17:53:30 +00:00
parent 579667537a
commit 806ebcb449
3 changed files with 11 additions and 10 deletions

View File

@@ -623,9 +623,10 @@ void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
** the new data into the backup.
*/
int rc;
if( p->pDestDb ) sqlite3_mutex_enter(p->pDestDb->mutex);
assert( p->pDestDb );
sqlite3_mutex_enter(p->pDestDb->mutex);
rc = backupOnePage(p, iPage, aData);
if( p->pDestDb ) sqlite3_mutex_leave(p->pDestDb->mutex);
sqlite3_mutex_leave(p->pDestDb->mutex);
assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
if( rc!=SQLITE_OK ){
p->rc = rc;