[PATCH] osmo-hlr[master]: code undup: use db_remove_reset() in db_auc.c

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Oct 10 01:32:01 UTC 2017


Review at  https://gerrit.osmocom.org/4187

code undup: use db_remove_reset() in db_auc.c

Change-Id: I32d728e2b8a9771421c097647aa0e060e29a601f
---
M src/db_auc.c
1 file changed, 2 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/87/4187/1

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 @@
 		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 @@
 		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;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/4187
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32d728e2b8a9771421c097647aa0e060e29a601f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list