Change in osmo-hlr[master]: db_hlr: db_subscrs_get(): fix unreachable code

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

fixeria gerrit-no-reply at lists.osmocom.org
Sat Jan 30 23:28:05 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/22565 )


Change subject: db_hlr: db_subscrs_get(): fix unreachable code
......................................................................

db_hlr: db_subscrs_get(): fix unreachable code

Change-Id: Iddf94f130365c2acc97f91908e0b705672fd5d81
Fixes: CID#216865
---
M src/db_hlr.c
1 file changed, 3 insertions(+), 6 deletions(-)



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

diff --git a/src/db_hlr.c b/src/db_hlr.c
index 2bcdeaa..8b0450e 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -704,15 +704,12 @@
 	db_remove_reset(stmt);
 	if (rc != SQLITE_DONE) {
 		*err = sqlite3_errmsg(dbc->db);
-		return -EIO;
-	} else if (rc == SQLITE_DONE) {
-		*err = NULL;
-		return 0;
-	} else {
-		*err = sqlite3_errmsg(dbc->db);
 		LOGP(DAUC, LOGL_ERROR, "Cannot read subscribers from db:: %s\n", *err);
 		return rc;
 	}
+
+	*err = NULL;
+	return 0;
 }
 
 /*! Retrieve subscriber data from the HLR database.

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/22565
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Iddf94f130365c2acc97f91908e0b705672fd5d81
Gerrit-Change-Number: 22565
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210130/fdfb1dbb/attachment.htm>


More information about the gerrit-log mailing list