1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Avoid unnecessary calls to memset() for a small performance improvement.

FossilOrigin-Name: 9e8c23acf74944a165c733682a956948b15bd401
This commit is contained in:
drh
2016-01-18 13:18:54 +00:00
parent 0536a07c0e
commit c263f7c4b3
5 changed files with 17 additions and 14 deletions

View File

@@ -1135,10 +1135,11 @@ ExprList *sqlite3ExprListAppend(
){
sqlite3 *db = pParse->db;
if( pList==0 ){
pList = sqlite3DbMallocZero(db, sizeof(ExprList) );
pList = sqlite3DbMallocRaw(db, sizeof(ExprList) );
if( pList==0 ){
goto no_mem;
}
pList->nExpr = 0;
pList->a = sqlite3DbMallocRaw(db, sizeof(pList->a[0]));
if( pList->a==0 ) goto no_mem;
}else if( (pList->nExpr & (pList->nExpr-1))==0 ){