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>
This commit is contained in:
parent
ac88e90557
commit
18c6946961
1 changed files with 0 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue