Skip to content

Commit c235c96

Browse files
committed
Fix duplicate local variable declaration in busy handler
C89-style: cancelled was declared twice in the same function scope after the data-race fix split the lock sections. Remove the second 'int' to reuse the variable declared at the top of the function.
1 parent 287b027 commit c235c96

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

c_src/sqlite3_nif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ exqlite_busy_handler(void* arg, int count)
474474

475475
// Wait on the condvar — can be woken early by cancel()
476476
tw_lock(&conn->cancel_tw);
477-
int cancelled = conn->cancelled;
477+
cancelled = conn->cancelled;
478478
if (!cancelled) {
479479
tw_wait_ms(&conn->cancel_tw, sleep_ms);
480480
cancelled = conn->cancelled; // snapshot again after waking

0 commit comments

Comments
 (0)