diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-18 00:28:53 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-18 10:47:41 -0500 |
commit | 5d291d050ebd714851c6bd85efd49a03d88414f0 (patch) | |
tree | bf8acfd686e0040b22da93aa61c22548cff07ef5 /lib/libalpm/util.c | |
parent | c4bd476ad13e142fe8323fe74d84b3950b53da17 (diff) | |
download | pacman-5d291d050ebd714851c6bd85efd49a03d88414f0.tar.xz |
Remove usages of alpm_list_next() in backend
Another function call that can be replaced by a single pointer
dereference.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r-- | lib/libalpm/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 4dc0fbe7..27709c64 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -638,7 +638,7 @@ char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename) struct stat buf; /* Loop through the cache dirs until we find a matching file */ - for(i = alpm_option_get_cachedirs(handle); i; i = alpm_list_next(i)) { + for(i = alpm_option_get_cachedirs(handle); i; i = i->next) { snprintf(path, PATH_MAX, "%s%s", (char *)alpm_list_getdata(i), filename); if(stat(path, &buf) == 0 && S_ISREG(buf.st_mode)) { @@ -663,7 +663,7 @@ const char *_alpm_filecache_setup(alpm_handle_t *handle) char *cachedir; /* Loop through the cache dirs until we find a writeable dir */ - for(i = alpm_option_get_cachedirs(handle); i; i = alpm_list_next(i)) { + for(i = alpm_option_get_cachedirs(handle); i; i = i->next) { cachedir = alpm_list_getdata(i); if(stat(cachedir, &buf) != 0) { /* cache directory does not exist.... try creating it */ |