summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/deps.c3
-rw-r--r--lib/libalpm/package.c2
-rw-r--r--lib/libalpm/sync.c2
-rw-r--r--lib/libalpm/util.c4
4 files changed, 6 insertions, 5 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 0da20c16..08494a6c 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -644,7 +644,8 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
providers, dep, NULL, &index);
}
if(index >= 0 && index < count) {
- alpm_pkg_t *pkg = alpm_list_getdata(alpm_list_nth(providers, index));
+ alpm_list_t *nth = alpm_list_nth(providers, index);
+ alpm_pkg_t *pkg = nth->data;
alpm_list_free(providers);
return pkg;
}
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index ecea4118..11bf01a8 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -696,7 +696,7 @@ int _alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg)
/* next see if the package is in a group that is ignored */
for(groups = handle->ignoregroup; groups; groups = groups->next) {
- char *grp = (char *)alpm_list_getdata(groups);
+ char *grp = groups->data;
if(alpm_list_find_str(alpm_pkg_get_groups(pkg), grp)) {
return 1;
}
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index c6a79fa0..732e786f 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -767,7 +767,7 @@ static int validate_deltas(alpm_handle_t *handle, alpm_list_t *deltas,
EVENT(handle, ALPM_EVENT_DELTA_INTEGRITY_START, NULL, NULL);
for(i = deltas; i; i = i->next) {
- alpm_delta_t *d = alpm_list_getdata(i);
+ alpm_delta_t *d = i->data;
char *filepath = _alpm_filecache_find(handle, d->delta);
if(_alpm_test_checksum(filepath, d->delta_md5, ALPM_CSUM_MD5)) {
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index e2f2f441..a15eb965 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -652,7 +652,7 @@ char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename)
/* Loop through the cache dirs until we find a matching file */
for(i = handle->cachedirs; i; i = i->next) {
- snprintf(path, PATH_MAX, "%s%s", (char *)alpm_list_getdata(i),
+ snprintf(path, PATH_MAX, "%s%s", (char *)i->data,
filename);
if(stat(path, &buf) == 0 && S_ISREG(buf.st_mode)) {
retpath = strdup(path);
@@ -677,7 +677,7 @@ const char *_alpm_filecache_setup(alpm_handle_t *handle)
/* Loop through the cache dirs until we find a usable directory */
for(i = handle->cachedirs; i; i = i->next) {
- cachedir = alpm_list_getdata(i);
+ cachedir = i->data;
if(stat(cachedir, &buf) != 0) {
/* cache directory does not exist.... try creating it */
_alpm_log(handle, ALPM_LOG_WARNING, _("no %s cache exists, creating...\n"),