1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Coverage improvements for malloc and vdbemem.c (CVS 1781)

FossilOrigin-Name: a98dd004c4d328eb44a71fecdbf8c5ab416dc524
This commit is contained in:
danielk1977
2004-06-30 11:54:06 +00:00
parent 376deb182a
commit 13073931a3
7 changed files with 77 additions and 96 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.243 2004/06/30 09:49:24 danielk1977 Exp $
** $Id: main.c,v 1.244 2004/06/30 11:54:07 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -748,7 +748,7 @@ int sqlite3_create_function(
}
p = sqlite3FindFunction(db, zFunctionName, nName, nArg, enc, 1);
if( p==0 ) return 1;
if( p==0 ) return SQLITE_NOMEM;
p->xFunc = xFunc;
p->xStep = xStep;
p->xFinalize = xFinal;
@@ -1180,6 +1180,9 @@ static int openDatabase(
}
opendb_out:
if( sqlite3_errcode(db)==SQLITE_OK && sqlite3_malloc_failed ){
sqlite3Error(db, SQLITE_NOMEM, 0);
}
*ppDb = db;
return sqlite3_errcode(db);
}