diff options
author | drh <> | 2021-10-28 12:07:43 +0000 |
---|---|---|
committer | drh <> | 2021-10-28 12:07:43 +0000 |
commit | 33d28ab4cf151707a0c45e59fb5586f9c7815f4b (patch) | |
tree | 6114fdd99f3f3c222d5f8aeb0e3541866eb4a458 /src/insert.c | |
parent | e8837211bc9528eedd2e054b062f5aad887e29ef (diff) | |
download | sqlite-33d28ab4cf151707a0c45e59fb5586f9c7815f4b.tar.gz sqlite-33d28ab4cf151707a0c45e59fb5586f9c7815f4b.zip |
Minor changes to make it easier for static analyzers to reason about the code.
FossilOrigin-Name: ba4104aa02625b51113978c1bb540b75bd88cb1959c7e9bfb4113db4159df5d4
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/insert.c b/src/insert.c index d8948e605..9b3b195f6 100644 --- a/src/insert.c +++ b/src/insert.c @@ -2613,8 +2613,9 @@ int sqlite3OpenTableAndIndices( assert( op==OP_OpenWrite || p5==0 ); if( IsVirtual(pTab) ){ /* This routine is a no-op for virtual tables. Leave the output - ** variables *piDataCur and *piIdxCur uninitialized so that valgrind - ** can detect if they are used by mistake in the caller. */ + ** variables *piDataCur and *piIdxCur set to illegal cursor numbers + ** for improved error detection. */ + *piDataCur = *piIdxCur = -999; return 0; } iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); |