1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Change the sqlite3_bind_value() implementation to use a default branch on

the type switch so that there are no untested jumps in the switch. (CVS 6505)

FossilOrigin-Name: d0a8bd6a53c5da0ac6b88818f82c7f7d330b527a
This commit is contained in:
drh
2009-04-14 12:58:20 +00:00
parent 29def56019
commit ac80db7845
3 changed files with 14 additions and 13 deletions

View File

@@ -13,7 +13,7 @@
** This file contains code use to implement APIs that are part of the
** VDBE.
**
** $Id: vdbeapi.c,v 1.162 2009/04/14 12:43:34 drh Exp $
** $Id: vdbeapi.c,v 1.163 2009/04/14 12:58:20 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@@ -1153,10 +1153,6 @@ int sqlite3_bind_text16(
int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
int rc;
switch( pValue->type ){
case SQLITE_NULL: {
rc = sqlite3_bind_null(pStmt, i);
break;
}
case SQLITE_INTEGER: {
rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
break;
@@ -1174,7 +1170,12 @@ int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
break;
}
case SQLITE_TEXT: {
rc = bindText(pStmt,i, pValue->z, pValue->n, SQLITE_TRANSIENT, pValue->enc);
rc = bindText(pStmt,i, pValue->z, pValue->n, SQLITE_TRANSIENT,
pValue->enc);
break;
}
default: {
rc = sqlite3_bind_null(pStmt, i);
break;
}
}