diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-10-13 14:10:50 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-10-13 14:28:44 -0400 |
commit | 7d6e4cd18f7169adce68be212f994d9b54d19c2b (patch) | |
tree | 77e90dc9aaa26cec936d1493de7f7556be88a74f /expac.c | |
parent | 3b9dc1ad1a60b2cfc106d3bc34d6c4463ed1bf4b (diff) | |
download | expac-7d6e4cd18f7169adce68be212f994d9b54d19c2b.tar.xz |
remove usage of alpm_list_getdata
Diffstat (limited to 'expac.c')
-rw-r--r-- | expac.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -320,7 +320,7 @@ static int print_list(alpm_list_t *list, extractfn fn, bool shortdeps) { while (1) { char *item; - item = (char*)(fn ? fn(alpm_list_getdata(i)) : alpm_list_getdata(i)); + item = (char*)(fn ? fn(i->data) : i->data); if (shortdeps) { *(item + strcspn(item, "<>=")) = '\0'; @@ -521,16 +521,16 @@ static alpm_list_t *resolve_pkg(alpm_list_t *targets) { if (!targets) { for (r = dblist; r; r = alpm_list_next(r)) { /* joining causes corruption on alpm_release(), so we copy */ - ret = alpm_list_join(ret, alpm_list_copy(alpm_db_get_pkgcache(alpm_list_getdata(r)))); + ret = alpm_list_join(ret, alpm_list_copy(alpm_db_get_pkgcache(r->data))); } } else if (search) { for (r = dblist; r; r = alpm_list_next(r)) { - ret = alpm_list_join(ret, alpm_db_search(alpm_list_getdata(r), targets)); + ret = alpm_list_join(ret, alpm_db_search(r->data, targets)); } } else if (groups) { for (t = targets; t; t = alpm_list_next(t)) { for (r = dblist; r; r = alpm_list_next(r)) { - alpm_group_t *grp = alpm_db_readgroup(alpm_list_getdata(r), alpm_list_getdata(t)); + alpm_group_t *grp = alpm_db_readgroup(r->data, t->data); if (grp) { ret = alpm_list_join(ret, alpm_list_copy(grp->packages)); } @@ -541,7 +541,7 @@ static alpm_list_t *resolve_pkg(alpm_list_t *targets) { alpm_pkg_t *pkg = NULL; int found = 0; - pkgname = reponame = alpm_list_getdata(t); + pkgname = reponame = t->data; if (strchr(pkgname, '/')) { strsep(&pkgname, "/"); } else { @@ -549,7 +549,7 @@ static alpm_list_t *resolve_pkg(alpm_list_t *targets) { } for (r = dblist; r; r = alpm_list_next(r)) { - alpm_db_t *repo = alpm_list_getdata(r); + alpm_db_t *repo = r->data; if (reponame && strcmp(reponame, alpm_db_get_name(repo)) != 0) { continue; @@ -606,7 +606,7 @@ int main(int argc, char *argv[]) { } for (i = results; i; i = alpm_list_next(i)) { - alpm_pkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = i->data; ret += print_pkg(pkg, format); } ret = !!ret; /* clamp to zero/one */ |