summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-19 14:32:53 -0500
committerDan McGee <dan@archlinux.org>2011-09-20 10:23:10 -0500
commit79cbce60ac4a40bf11d039e9bdcd09c852ce3292 (patch)
treec13c3310fb1167f448c238188a93873a63c4092d /lib/libalpm/util.c
parent70e2c34f0f5db329b8e92fe3fc3043e495272f14 (diff)
downloadpacman-79cbce60ac4a40bf11d039e9bdcd09c852ce3292.tar.xz
Remove all usages of alpm_list_getdata() from the library
No need for the indirection; just access ->data instead. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c4
1 files changed, 2 insertions, 2 deletions
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"),