summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_local.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-18 06:25:19 +0200
committerDan McGee <dan@archlinux.org>2011-08-18 17:47:41 +0200
commitc4bd476ad13e142fe8323fe74d84b3950b53da17 (patch)
treeddfd2afb08bf94b300eecee7cfef3394ed8c1092 /lib/libalpm/be_local.c
parentc885a953eb888004f0302ed3eceafef93e2f072f (diff)
downloadpacman-c4bd476ad13e142fe8323fe74d84b3950b53da17.tar.gz
pacman-c4bd476ad13e142fe8323fe74d84b3950b53da17.tar.xz
Remove use of no-op accessor functions in library
The functions alpm_db_get_name(), alpm_pkg_get_name(), and alpm_pkg_get_version() are not necessary at all, so remove the calling and indirection when used in the backend, which makes things slightly more efficient and reduces code size. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r--lib/libalpm/be_local.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 5b69f628..1b489224 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -192,11 +192,10 @@ 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",
alpm_option_get_dbpath(pkg->handle),
- alpm_db_get_name(alpm_pkg_get_db(pkg)),
- alpm_pkg_get_name(pkg),
- alpm_pkg_get_version(pkg));
+ db->treename, pkg->name, pkg->version);
return fopen(clfile, "r");
}