1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Replace a few sqlite3_malloc()+memset() sequences with calls to sqlite3MallocZero().

FossilOrigin-Name: 305b6667265353b858b79bfea1745e64ff3bb7d3
This commit is contained in:
dan
2012-07-30 14:53:54 +00:00
parent 0b5ae72993
commit 6809c96df3
8 changed files with 20 additions and 27 deletions

View File

@@ -340,10 +340,9 @@ int sqlite3BitvecBuiltinTest(int sz, int *aOp){
/* Allocate the Bitvec to be tested and a linear array of
** bits to act as the reference */
pBitvec = sqlite3BitvecCreate( sz );
pV = sqlite3_malloc( (sz+7)/8 + 1 );
pV = sqlite3MallocZero( (sz+7)/8 + 1 );
pTmpSpace = sqlite3_malloc(BITVEC_SZ);
if( pBitvec==0 || pV==0 || pTmpSpace==0 ) goto bitvec_end;
memset(pV, 0, (sz+7)/8 + 1);
/* NULL pBitvec tests */
sqlite3BitvecSet(0, 1);