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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Oct 11 20:32:29 UTC 2017


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/4187

to look at the new patch set (#3).

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/3

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: newpatchset
Gerrit-Change-Id: I32d728e2b8a9771421c097647aa0e060e29a601f
Gerrit-PatchSet: 3
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list