1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Reduce the width of a memset() to avoid double-initializing some variables.

FossilOrigin-Name: 34edbfd12d6cfa6bbfa30eef9276a4865eadc869
This commit is contained in:
drh
2016-10-01 20:43:41 +00:00
parent 230368c30d
commit 216b70ff82
3 changed files with 8 additions and 8 deletions

View File

@@ -461,7 +461,7 @@ static SQLITE_NOINLINE PgHdr *pcacheFetchFinishWithInit(
assert( pPage!=0 );
pPgHdr = (PgHdr*)pPage->pExtra;
assert( pPgHdr->pPage==0 );
memset(pPgHdr, 0, sizeof(PgHdr));
memset(&pPgHdr->pDirty, 0, sizeof(PgHdr) - offsetof(PgHdr,pDirty));
pPgHdr->pPage = pPage;
pPgHdr->pData = pPage->pBuf;
pPgHdr->pExtra = (void *)&pPgHdr[1];