aboutsummaryrefslogtreecommitdiff
path: root/src/build.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-02-05 13:38:36 +0000
committerdrh <drh@noemail.net>2016-02-05 13:38:36 +0000
commit575fad6500070ad7fc7f91a8906b0b285965f99a (patch)
tree02a034f606a55aa903a161878ede6ff87932f75b /src/build.c
parent98c7a12c003278d9332c25dc9782e491b7bb0845 (diff)
downloadsqlite-575fad6500070ad7fc7f91a8906b0b285965f99a.tar.gz
sqlite-575fad6500070ad7fc7f91a8906b0b285965f99a.zip
Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority
cases where db is guaranteed to be not NULL. FossilOrigin-Name: 0a802e96ab06e2643834b83671fa8353da1a348d
Diffstat (limited to 'src/build.c')
-rw-r--r--src/build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/build.c b/src/build.c
index 4185f48e9..476fc28c4 100644
--- a/src/build.c
+++ b/src/build.c
@@ -3702,8 +3702,9 @@ SrcList *sqlite3SrcListAppend(
){
struct SrcList_item *pItem;
assert( pDatabase==0 || pTable!=0 ); /* Cannot have C without B */
+ assert( db!=0 );
if( pList==0 ){
- pList = sqlite3DbMallocRaw(db, sizeof(SrcList) );
+ pList = sqlite3DbMallocRawNN(db, sizeof(SrcList) );
if( pList==0 ) return 0;
pList->nAlloc = 1;
pList->nSrc = 0;