From 18c69469618fef612a74ee550e157a45fc099efc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 23 Mar 2011 03:28:11 -0500 Subject: Remove unnecessary sanity check on db->setserver We pass in a db object, so no need to go looking for it in the list on the handle. This is a remnant of when we passed in a treename, more than likely. Signed-off-by: Dan McGee --- lib/libalpm/db.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lib/libalpm/db.c') diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 20e1999b..cb575c8a 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -154,8 +154,6 @@ int SYMEXPORT alpm_db_unregister(pmdb_t *db) */ int SYMEXPORT alpm_db_setserver(pmdb_t *db, const char *url) { - alpm_list_t *i; - int found = 0; char *newurl; size_t len = 0; @@ -164,16 +162,6 @@ int SYMEXPORT alpm_db_setserver(pmdb_t *db, const char *url) /* Sanity checks */ ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1)); - for(i = handle->dbs_sync; i && !found; i = i->next) { - pmdb_t *sdb = i->data; - if(strcmp(db->treename, sdb->treename) == 0) { - found = 1; - } - } - if(!found) { - RET_ERR(PM_ERR_DB_NOT_FOUND, -1); - } - if(url) { len = strlen(url); } -- cgit v1.2.3-70-g09d2