Fixes to 'configure' build system. Also extra coverage for main.c. (CVS 2204)
FossilOrigin-Name: 8378455f32c3010ccc28181048c746ecb8a9fa67
diff --git a/src/main.c b/src/main.c
index 75d9395..45072d2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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.270 2005/01/12 12:44:04 danielk1977 Exp $
+** $Id: main.c,v 1.271 2005/01/13 02:14:25 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -378,7 +378,7 @@
** This is the default collating function named "BINARY" which is always
** available.
*/
-static int binaryCollatingFunc(
+static int binCollFunc(
void *NotUsed,
int nKey1, const void *pKey1,
int nKey2, const void *pKey2
@@ -1101,7 +1101,6 @@
){
sqlite3 *db;
int rc, i;
- char *zErrMsg = 0;
/* Allocate the sqlite data structure */
db = sqliteMalloc( sizeof(sqlite3) );
@@ -1126,11 +1125,9 @@
** and UTF-16, so add a version for each to avoid any unnecessary
** conversions. The only error that can occur here is a malloc() failure.
*/
- sqlite3_create_collation(db, "BINARY", SQLITE_UTF8, 0,binaryCollatingFunc);
- sqlite3_create_collation(db, "BINARY", SQLITE_UTF16LE, 0,binaryCollatingFunc);
- sqlite3_create_collation(db, "BINARY", SQLITE_UTF16BE, 0,binaryCollatingFunc);
- db->pDfltColl = sqlite3FindCollSeq(db, db->enc, "BINARY", 6, 0);
- if( !db->pDfltColl ){
+ if( sqlite3_create_collation(db, "BINARY", SQLITE_UTF8, 0,binCollFunc) ||
+ sqlite3_create_collation(db, "BINARY", SQLITE_UTF16, 0,binCollFunc) ||
+ !(db->pDfltColl = sqlite3FindCollSeq(db, db->enc, "BINARY", 6, 0)) ){
rc = db->errCode;
assert( rc!=SQLITE_OK );
db->magic = SQLITE_MAGIC_CLOSED;