diff options
author | Dan McGee <dan@archlinux.org> | 2011-03-23 03:28:11 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-03-23 03:33:31 -0500 |
commit | 18c69469618fef612a74ee550e157a45fc099efc (patch) | |
tree | d26993c0d43fb9959f0b4622f94e95752acd599c | |
parent | ac88e90557089763db82038105dd8e50e7ec8773 (diff) | |
download | pacman-18c69469618fef612a74ee550e157a45fc099efc.tar.xz |
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 <dan@archlinux.org>
-rw-r--r-- | lib/libalpm/db.c | 12 |
1 files changed, 0 insertions, 12 deletions
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); } |