code undup: use db_bind_text() in db_get_auth_data()
To make the db_bind_text() error reporting mention "imsi", change the
DB_STMT_AUC_BY_IMSI to use a named parameter.
Change-Id: I49bd5eb78170cf4cdf8abb386c766d20d9f1cf73
diff --git a/src/db_auc.c b/src/db_auc.c
index eae5070..7bbc93f 100644
--- a/src/db_auc.c
+++ b/src/db_auc.c
@@ -87,14 +87,8 @@
memset(aud2g, 0, sizeof(*aud2g));
memset(aud3g, 0, sizeof(*aud3g));
- /* bind the IMSI value */
- rc = sqlite3_bind_text(stmt, 1, imsi, -1,
- SQLITE_STATIC);
- if (rc != SQLITE_OK) {
- LOGAUC(imsi, LOGL_ERROR, "Error binding IMSI: %d\n", rc);
- ret = -EIO;
- goto out;
- }
+ if (!db_bind_text(stmt, "$imsi", imsi))
+ return -EIO;
/* execute the statement */
rc = sqlite3_step(stmt);