diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/func.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/func.c b/src/func.c index da6b872d4..537d35be1 100644 --- a/src/func.c +++ b/src/func.c @@ -16,7 +16,7 @@ ** sqliteRegisterBuildinFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: func.c,v 1.228 2009/04/02 10:16:18 drh Exp $ +** $Id: func.c,v 1.229 2009/04/02 13:36:37 drh Exp $ */ #include "sqliteInt.h" #include <stdlib.h> @@ -1217,7 +1217,7 @@ static void minMaxFinalize(sqlite3_context *context){ sqlite3_value *pRes; pRes = (sqlite3_value *)sqlite3_aggregate_context(context, 0); if( pRes ){ - if( pRes->flags ){ + if( ALWAYS(pRes->flags) ){ sqlite3_result_value(context, pRes); } sqlite3VdbeMemRelease(pRes); @@ -1302,7 +1302,7 @@ static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){ FuncDef *pDef; pDef = sqlite3FindFunction(db, zName, sqlite3Strlen30(zName), 2, SQLITE_UTF8, 0); - if( pDef ){ + if( ALWAYS(pDef) ){ pDef->flags = flagVal; } } @@ -1346,7 +1346,7 @@ int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){ assert( !ExprHasProperty(pExpr, EP_xIsSelect) ); pDef = sqlite3FindFunction(db, (char*)pExpr->token.z, pExpr->token.n, 2, SQLITE_UTF8, 0); - if( pDef==0 || (pDef->flags & SQLITE_FUNC_LIKE)==0 ){ + if( NEVER(pDef==0) || (pDef->flags & SQLITE_FUNC_LIKE)==0 ){ return 0; } |