From 2245a46af23ba3407572d1f2d377fb240f0a3bbe Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sat, 29 Nov 2014 18:29:21 +0000 Subject: Spamotron: code refactoring. Review and tests required. git-svn-id: http://svn.miranda-ng.org/main/trunk@11153 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Spamotron/src/sqlite3/sqlite3.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Spamotron/src/sqlite3') diff --git a/plugins/Spamotron/src/sqlite3/sqlite3.c b/plugins/Spamotron/src/sqlite3/sqlite3.c index 9193fa37fd..5619089543 100644 --- a/plugins/Spamotron/src/sqlite3/sqlite3.c +++ b/plugins/Spamotron/src/sqlite3/sqlite3.c @@ -19,7 +19,7 @@ ** ** This amalgamation was generated on 2009-04-15 12:44:27 UTC. */ -#define _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS #define SQLITE_CORE 1 #define SQLITE_AMALGAMATION 1 @@ -40135,11 +40135,11 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked( && pCur->apPage[0]->intKey ){ if( pCur->info.nKey==intKey ){ - *pRes = 0; + if( pRes ) *pRes = 0; return SQLITE_OK; } if( pCur->atLast && pCur->info.nKeyapPage[pCur->iPage] ); assert( pCur->apPage[pCur->iPage]->isInit ); if( pCur->eState==CURSOR_INVALID ){ - *pRes = -1; + if( pRes ) *pRes = -1; assert( pCur->apPage[pCur->iPage]->nCell==0 ); return SQLITE_OK; } @@ -40219,7 +40219,7 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked( upr = lwr - 1; break; }else{ - *pRes = 0; + if( pRes ) *pRes = 0; rc = SQLITE_OK; goto moveto_finish; } @@ -72895,6 +72895,7 @@ SQLITE_PRIVATE int sqlite3InitCallback(void *pInit, int argc, char **argv, char int iDb = pData->iDb; assert( argc==3 ); + if( argv==0 ) return 0; /* Might happen if EMPTY_RESULT_CALLBACKS are on */ UNUSED_PARAMETER2(NotUsed, argc); assert( sqlite3_mutex_held(db->mutex) ); DbClearProperty(db, iDb, DB_Empty); @@ -72904,7 +72905,6 @@ SQLITE_PRIVATE int sqlite3InitCallback(void *pInit, int argc, char **argv, char } assert( iDb>=0 && iDbnDb ); - if( argv==0 ) return 0; /* Might happen if EMPTY_RESULT_CALLBACKS are on */ if( argv[1]==0 ){ corruptSchema(pData, argv[0], 0); }else if( argv[2] && argv[2][0] ){ -- cgit v1.2.3