Skip to content

Commit dce7ada

Browse files
author
Erlend E. Aasland
committed
PEP 7
1 parent 3645ccc commit dce7ada

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Modules/_sqlite/statement.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ typedef enum {
4848
TYPE_UNKNOWN
4949
} parameter_type;
5050

51-
static int pysqlite_statement_is_dml(sqlite3_stmt *statement, const char *sql)
51+
static int
52+
pysqlite_statement_is_dml(sqlite3_stmt *statement, const char *sql)
5253
{
53-
const char* p;
54-
int is_dml = 0;
54+
int is_dml = !sqlite3_stmt_readonly(statement);
5555

56-
is_dml = !sqlite3_stmt_readonly(statement);
5756
if (is_dml) {
5857
/* Retain backwards-compatibility, as sqlite3_stmt_readonly will return
5958
* false for BEGIN [IMMEDIATE|EXCLUSIVE] or DDL statements. */
60-
for (p = sql; *p != 0; p++) {
59+
for (const char *p = sql; *p != 0; p++) {
6160
switch (*p) {
6261
case ' ':
6362
case '\r':

0 commit comments

Comments
 (0)