diff options
Diffstat (limited to 'src/wal.c')
-rw-r--r-- | src/wal.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -694,10 +694,8 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){ nByte = sizeof(WalIterator) + (nSegment-1)*sizeof(struct WalSegment) + 512; p = (WalIterator *)sqlite3_malloc(nByte); if( !p ){ - return SQLITE_NOMEM; - } - - if( p ){ + rc = SQLITE_NOMEM; + }else{ memset(p, 0, nByte); p->nSegment = nSegment; @@ -718,7 +716,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){ } *pp = p; - return SQLITE_OK; + return rc; } /* |