From e451540b9c18faad0dfd6a3e708c274963483993 Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Wed, 17 Jun 2015 11:57:00 -0500 Subject: [PATCH] Remove null check, assignment always occurs --- src/crypto_impl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/crypto_impl.c b/src/crypto_impl.c index 8c891d5..12fefb8 100644 --- a/src/crypto_impl.c +++ b/src/crypto_impl.c @@ -1158,11 +1158,9 @@ int sqlcipher_codec_ctx_migrate(codec_ctx *ctx) { db->nTotalChange = saved_nTotalChange; db->xTrace = saved_xTrace; db->autoCommit = 1; - if( pDb ){ - sqlite3BtreeClose(pDb->pBt); - pDb->pBt = 0; - pDb->pSchema = 0; - } + sqlite3BtreeClose(pDb->pBt); + pDb->pBt = 0; + pDb->pSchema = 0; sqlite3ResetAllSchemasOfConnection(db); remove(migrated_db_filename); sqlite3_free(migrated_db_filename);