From 80c83f6e0ca6fa76d5df3a12f779c597448550a6 Mon Sep 17 00:00:00 2001 From: Greg Stein Date: Mon, 10 May 2021 06:08:17 -0500 Subject: [PATCH] Remove redundant reset() pysqlite_statement_reset() is being called twice. Nuke one, and add a `(void)` to the call to be explicit that we're tossing the result code. --- Modules/_sqlite/cursor.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index b71f780a0b4dfd..518088dfe71bf1 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -457,7 +457,7 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* operation if (self->statement != NULL) { /* There is an active statement */ - pysqlite_statement_reset(self->statement); + (void)pysqlite_statement_reset(self->statement); } /* reset description and rowcount */ @@ -473,10 +473,6 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* operation goto error; } - if (self->statement) { - (void)pysqlite_statement_reset(self->statement); - } - Py_XSETREF(self->statement, (pysqlite_Statement *)pysqlite_cache_get(self->connection->statement_cache, func_args)); Py_DECREF(func_args); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy