summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-30 11:08:49 -0500
committerDan McGee <dan@archlinux.org>2011-09-30 11:08:49 -0500
commitc4d6688694975c877e6bff3d6147ae23207a0cbe (patch)
treefe2a7ec1fc999ce3973527e7cb7fd3868689b55c /lib
parentb0543440caad87f1f660eefd6ec5f1a07c7763a0 (diff)
downloadpacman-c4d6688694975c877e6bff3d6147ae23207a0cbe.tar.xz
Use _alpm_local_db_pkgpath in _cache_changelog_open
Another place where we were doing the dirty work by hand. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/be_local.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 88ecec0c..56cf38bb 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -173,11 +173,11 @@ static alpm_list_t *_cache_get_backup(alpm_pkg_t *pkg)
*/
static void *_cache_changelog_open(alpm_pkg_t *pkg)
{
- char clfile[PATH_MAX];
alpm_db_t *db = alpm_pkg_get_db(pkg);
- snprintf(clfile, PATH_MAX, "%s/%s/%s-%s/changelog",
- pkg->handle->dbpath, db->treename, pkg->name, pkg->version);
- return fopen(clfile, "r");
+ char *clfile = _alpm_local_db_pkgpath(db, pkg, "changelog");
+ FILE *f = fopen(clfile, "r");
+ free(clfile);
+ return f;
}
/**