Skip to content

Commit 4fec0dc

Browse files
committed
remove redefines for PAGER_MJ_PGNO to PAGER_SJ_PGNO
1 parent 1032c43 commit 4fec0dc

4 files changed

Lines changed: 6 additions & 14 deletions

File tree

src/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ int sqlite3_rekey_v2(sqlite3 *db, const char *zDb, const void *pKey, int nKey) {
978978
rc = sqlite3BtreeBeginTrans(pDb->pBt, 1, 0); /* begin write transaction */
979979
sqlite3PagerPagecount(pPager, &page_count);
980980
for(pgno = 1; rc == SQLITE_OK && pgno <= (unsigned int)page_count; pgno++) { /* pgno's start at 1 see pager.c:pagerAcquire */
981-
if(!sqlite3pager_is_mj_pgno(pPager, pgno)) { /* skip this page (see pager.c:pagerAcquire for reasoning) */
981+
if(!sqlite3pager_is_sj_pgno(pPager, pgno)) { /* skip this page (see pager.c:pagerAcquire for reasoning) */
982982
rc = sqlite3PagerGet(pPager, pgno, &page, 0);
983983
if(rc == SQLITE_OK) { /* write page see pager_incr_changecounter for example */
984984
rc = sqlite3PagerWrite(page);

src/crypto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
/* extensions defined in pager.c */
6767
void *sqlcipherPagerGetCodec(Pager*);
6868
void sqlcipherPagerSetCodec(Pager*, void *(*)(void*,void*,Pgno,int), void (*)(void*,int,int), void (*)(void*), void *);
69-
int sqlite3pager_is_mj_pgno(Pager*, Pgno);
69+
int sqlite3pager_is_sj_pgno(Pager*, Pgno);
7070
void sqlite3pager_error(Pager*, int);
7171
void sqlite3pager_reset(Pager *pPager);
7272
/* end extensions defined in pager.c */

src/crypto_impl.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
#include "sqlcipher.h"
3535
#include "crypto.h"
3636

37-
#ifndef PAGER_MJ_PGNO
38-
#define PAGER_MJ_PGNO(x) PAGER_SJ_PGNO(x)
39-
#endif
40-
4137
#ifdef SQLCIPHER_TEST
4238
static volatile unsigned int cipher_test_flags = 0;
4339
unsigned int sqlcipher_get_test_flags() {
@@ -1382,8 +1378,8 @@ int sqlcipher_codec_ctx_integrity_check(codec_ctx *ctx, Parse *pParse, char *col
13821378
int payload_sz = ctx->page_sz - ctx->reserve_sz + ctx->iv_sz;
13831379
int read_sz = ctx->page_sz;
13841380

1385-
/* skip integrity check on PAGER_MJ_PGNO since it will have no valid content */
1386-
if(sqlite3pager_is_mj_pgno(ctx->pBt->pBt->pPager, page)) continue;
1381+
/* skip integrity check on PAGER_SJ_PGNO since it will have no valid content */
1382+
if(sqlite3pager_is_sj_pgno(ctx->pBt->pBt->pPager, page)) continue;
13871383

13881384
if(page==1) {
13891385
int page1_offset = ctx->plaintext_header_sz ? ctx->plaintext_header_sz : FILE_HEADER_SZ;

src/pager.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7906,12 +7906,8 @@ int sqlite3PagerWalFramesize(Pager *pPager){
79067906
/* BEGIN SQLCIPHER */
79077907
#ifdef SQLITE_HAS_CODEC
79087908

7909-
#ifndef PAGER_MJ_PGNO
7910-
#define PAGER_MJ_PGNO(x) PAGER_SJ_PGNO(x)
7911-
#endif
7912-
7913-
int sqlite3pager_is_mj_pgno(Pager *pPager, Pgno pgno) {
7914-
return (PAGER_MJ_PGNO(pPager) == pgno) ? 1 : 0;
7909+
int sqlite3pager_is_sj_pgno(Pager *pPager, Pgno pgno) {
7910+
return (PAGER_SJ_PGNO(pPager) == pgno) ? 1 : 0;
79157911
}
79167912

79177913
void sqlite3pager_error(Pager *pPager, int error) {

0 commit comments

Comments
 (0)