summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-09 22:49:25 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-10-11 22:32:19 +0200
commit76328e57d1d9c7df8763b2b8be6fce39e5822731 (patch)
treec472d7d2e97919c83e5c12c7dd8fbd6a1b111aea /src
parent57a8792f230f2ec6db72f3b6249b702428ab5d6e (diff)
code undup: use db_remove_reset() in db_auc.c
Diffstat (limited to 'src')
-rw-r--r--src/db_auc.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/db_auc.c b/src/db_auc.c
index 10c1816..d469920 100644
--- a/src/db_auc.c
+++ b/src/db_auc.c
@@ -60,16 +60,7 @@ int db_update_sqn(struct db_context *dbc, int64_t id,
return -2;
}
- /* remove bindings and reset statement to be re-executed */
- rc = sqlite3_clear_bindings(stmt);
- if (rc != SQLITE_OK) {
- LOGP(DAUC, LOGL_ERROR, "Error clerearing bindings: %d\n", rc);
- }
- rc = sqlite3_reset(stmt);
- if (rc != SQLITE_OK) {
- LOGP(DAUC, LOGL_ERROR, "Error in sqlite3_reset: %d\n", rc);
- }
-
+ db_remove_reset(stmt);
return 0;
}
@@ -172,16 +163,7 @@ int db_get_auth_data(struct db_context *dbc, const char *imsi,
ret = -ENOENT;
out:
- /* remove bindings and reset statement to be re-executed */
- rc = sqlite3_clear_bindings(stmt);
- if (rc != SQLITE_OK) {
- LOGAUC(imsi, LOGL_ERROR, "Error in sqlite3_clear_bindings(): %d\n", rc);
- }
- rc = sqlite3_reset(stmt);
- if (rc != SQLITE_OK) {
- LOGAUC(imsi, LOGL_ERROR, "Error in sqlite3_reset(): %d\n", rc);
- }
-
+ db_remove_reset(stmt);
return ret;
}