diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-05-08 12:33:41 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-05-08 12:33:41 +0300 |
commit | 6ff122b83a32c7dcab917cbf3f493d93aba20f3d (patch) | |
tree | 9b6a24646396853068340c95963365427c17b8e2 /src | |
parent | 3a3424774944a421e1b93cbaf533a3500a4d613c (diff) | |
download | ck-6ff122b83a32c7dcab917cbf3f493d93aba20f3d.tar.gz ck-6ff122b83a32c7dcab917cbf3f493d93aba20f3d.tar.bz2 ck-6ff122b83a32c7dcab917cbf3f493d93aba20f3d.zip |
minor cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/dblayer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dblayer.c b/src/dblayer.c index a18d0d0..8014d08 100644 --- a/src/dblayer.c +++ b/src/dblayer.c @@ -40,7 +40,7 @@ int check_initialized_DB(sqlite3 *db) { dbh_form_query_select_all_tables(sql); sqlite3_stmt *stmt; - int rc = sqlite3_prepare_v2(db, sql, strlen(sql), &stmt, NULL); + sqlite3_prepare_v2(db, sql, strlen(sql), &stmt, NULL); int program_table_ok, config_table_ok, rel_table_ok = 0; while (sqlite3_step(stmt) != SQLITE_DONE) { @@ -306,8 +306,8 @@ int program_has_primary_config(DB *db, const int pid, char *ret, int *sec) { PRINT_ERR("while preparing program_has_primary_exists sql."); return -2; } + sqlite3_bind_int(stmt, 1, pid); - int count = 0; while (sqlite3_step(stmt) == SQLITE_ROW) { if (sqlite3_column_int(stmt, 0) == 1) { if (ret) { |