Skip to content

Commit 53b49a7

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 5a2979c commit 53b49a7

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
@@ -479,7 +479,7 @@ exqlite_busy_handler(void* arg, int count)
479479

480480
// Wait on the condvar — can be woken early by cancel()
481481
tw_lock(&conn->cancel_tw);
482-
int cancelled = conn->cancelled;
482+
cancelled = conn->cancelled;
483483
if (!cancelled) {
484484
tw_wait_ms(&conn->cancel_tw, sleep_ms);
485485
cancelled = conn->cancelled; // snapshot again after waking

0 commit comments

Comments
 (0)