From 57e01c9968d9d558263feaf449da033c2b0b931a Mon Sep 17 00:00:00 2001 From: Maas-Maarten Zeeman Date: Fri, 24 Feb 2017 16:29:50 +0100 Subject: [PATCH] Remove unneeded variable --- c_src/esqlite3_nif.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/c_src/esqlite3_nif.c b/c_src/esqlite3_nif.c index 7a46f74..171e59a 100644 --- a/c_src/esqlite3_nif.c +++ b/c_src/esqlite3_nif.c @@ -39,7 +39,6 @@ typedef struct { sqlite3 *db; queue *commands; - int alive; } esqlite_connection; /* prepared statement */ @@ -669,20 +668,18 @@ esqlite_connection_run(void *arg) esqlite_command *cmd; int continue_running = 1; - db->alive = 1; - while(continue_running) { cmd = queue_pop(db->commands); - if(cmd->type == cmd_stop) + if(cmd->type == cmd_stop) { continue_running = 0; - else + } else { enif_send(NULL, &cmd->pid, cmd->env, make_answer(cmd, evaluate_command(cmd, db))); + } command_destroy(cmd); } - db->alive = 0; return NULL; }