From 6be492d2f71bf0968b836e17a0f59a0e32572b49 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 6 Oct 2011 00:55:47 -0500 Subject: Remove alpm_list_getdata wrapper function This one is pretty darn useless. Just derefence the ->data attribute since the type is public anyway and save yourself the function call. Signed-off-by: Dan McGee --- src/util/testdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util/testdb.c') diff --git a/src/util/testdb.c b/src/util/testdb.c index d85687a4..783d4993 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -101,7 +101,7 @@ static int checkdeps(alpm_list_t *pkglist) /* check dependencies */ data = alpm_checkdeps(handle, pkglist, NULL, pkglist, 0); for(i = data; i; i = alpm_list_next(i)) { - alpm_depmissing_t *miss = alpm_list_getdata(i); + alpm_depmissing_t *miss = i->data; char *depstring = alpm_dep_compute_string(miss->depend); printf("missing dependency for %s : %s\n", miss->target, depstring); @@ -119,7 +119,7 @@ static int checkconflicts(alpm_list_t *pkglist) /* check conflicts */ data = alpm_checkconflicts(handle, pkglist); for(i = data; i; i = i->next) { - alpm_conflict_t *conflict = alpm_list_getdata(i); + alpm_conflict_t *conflict = i->data; printf("%s conflicts with %s\n", conflict->package1, conflict->package2); ret++; @@ -154,7 +154,7 @@ static int check_syncdbs(alpm_list_t *dbnames) const alpm_siglevel_t level = ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL; for(i = dbnames; i; i = alpm_list_next(i)) { - char *dbname = alpm_list_getdata(i); + const char *dbname = i->data; db = alpm_db_register_sync(handle, dbname, level); if(db == NULL) { fprintf(stderr, "error: could not register sync database (%s)\n", -- cgit v1.2.3-2-g168b