summaryrefslogtreecommitdiff
path: root/src/pacman
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/package.c8
-rw-r--r--src/pacman/query.c6
2 files changed, 8 insertions, 6 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 1a08c0bb..5514f001 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -218,7 +218,7 @@ void dump_pkg_backups(alpm_pkg_t *pkg)
*/
void dump_pkg_files(alpm_pkg_t *pkg, int quiet)
{
- const char *pkgname, *root, *filestr;
+ const char *pkgname, *root;
alpm_list_t *i, *pkgfiles;
pkgname = alpm_pkg_get_name(pkg);
@@ -226,11 +226,11 @@ void dump_pkg_files(alpm_pkg_t *pkg, int quiet)
root = alpm_option_get_root(config->handle);
for(i = pkgfiles; i; i = alpm_list_next(i)) {
- filestr = alpm_list_getdata(i);
+ const alpm_file_t *file = alpm_list_getdata(i);
if(!quiet){
- fprintf(stdout, "%s %s%s\n", pkgname, root, filestr);
+ fprintf(stdout, "%s %s%s\n", pkgname, root, file->name);
} else {
- fprintf(stdout, "%s%s\n", root, filestr);
+ fprintf(stdout, "%s%s\n", root, file->name);
}
}
diff --git a/src/pacman/query.c b/src/pacman/query.c
index df4f7f19..045dc7f0 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -193,7 +193,8 @@ static int query_fileowner(alpm_list_t *targets)
for(j = alpm_pkg_get_files(info); j && !found; j = alpm_list_next(j)) {
char *ppath, *pdname;
- const char *pkgfile = alpm_list_getdata(j);
+ const alpm_file_t *file = alpm_list_getdata(j);
+ const char *pkgfile = file->name;
/* avoid the costly resolve_path usage if the basenames don't match */
if(strcmp(mbasename(pkgfile), bname) != 0) {
@@ -416,7 +417,8 @@ static int check(alpm_pkg_t *pkg)
const char *pkgname = alpm_pkg_get_name(pkg);
for(i = alpm_pkg_get_files(pkg); i; i = alpm_list_next(i)) {
struct stat st;
- const char *path = alpm_list_getdata(i);
+ const alpm_file_t *file = alpm_list_getdata(i);
+ const char *path = file->name;
if(rootlen + 1 + strlen(path) > PATH_MAX) {
pm_fprintf(stderr, ALPM_LOG_WARNING, _("path too long: %s%s\n"), root, path);