mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Avoid unnecessary memory zeroing during expression list allocation.
FossilOrigin-Name: de28e6514a42438411e2c9d833ba660108128ca86d0b90f32925fb73195f4862
This commit is contained in:
@@ -1488,7 +1488,9 @@ ExprList *sqlite3ExprListAppend(
|
||||
pList->nAlloc *= 2;
|
||||
}
|
||||
pItem = &pList->a[pList->nExpr++];
|
||||
memset(pItem, 0, sizeof(*pItem));
|
||||
assert( offsetof(struct ExprList_item,zName)==sizeof(pItem->pExpr) );
|
||||
assert( offsetof(struct ExprList_item,pExpr)==0 );
|
||||
memset(&pItem->zName,0,sizeof(*pItem)-offsetof(struct ExprList_item,zName));
|
||||
pItem->pExpr = pExpr;
|
||||
return pList;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user