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

Make sure Tcl_AppendResult() always has a NULL-pointer argument at the end.

FossilOrigin-Name: c07aef6f909fe35de110f0b180dbf5aa4c226af3
This commit is contained in:
drh
2017-01-12 11:50:08 +00:00
parent ba47020b63
commit ea8f0a155e
3 changed files with 12 additions and 13 deletions

View File

@@ -2307,7 +2307,7 @@ static int SQLITE_TCLAPI DbObjCmd(
}
in = fopen(zFile, "rb");
if( in==0 ){
Tcl_AppendResult(interp, "Error: cannot open file: ", zFile, NULL);
Tcl_AppendResult(interp, "Error: cannot open file: ", zFile, (char*)0);
sqlite3_finalize(pStmt);
return TCL_ERROR;
}
@@ -2536,7 +2536,7 @@ static int SQLITE_TCLAPI DbObjCmd(
int n = strlen30(z);
if( n>2 && strncmp(z, "-argcount",n)==0 ){
if( i==(objc-2) ){
Tcl_AppendResult(interp, "option requires an argument: ", z, 0);
Tcl_AppendResult(interp, "option requires an argument: ", z,(char*)0);
return TCL_ERROR;
}
if( Tcl_GetIntFromObj(interp, objv[i+1], &nArg) ) return TCL_ERROR;
@@ -2551,7 +2551,7 @@ static int SQLITE_TCLAPI DbObjCmd(
flags |= SQLITE_DETERMINISTIC;
}else{
Tcl_AppendResult(interp, "bad option \"", z,
"\": must be -argcount or -deterministic", 0
"\": must be -argcount or -deterministic", (char*)0
);
return TCL_ERROR;
}
@@ -3208,7 +3208,7 @@ static int SQLITE_TCLAPI DbObjCmd(
pObj = Tcl_NewStringObj((char*)sqlite3_value_text(pValue), -1);
Tcl_SetObjResult(interp, pObj);
}else{
Tcl_AppendResult(interp, sqlite3_errmsg(pDb->db), 0);
Tcl_AppendResult(interp, sqlite3_errmsg(pDb->db), (char*)0);
return TCL_ERROR;
}
}