diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-18 06:25:19 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-18 17:47:41 +0200 |
commit | c4bd476ad13e142fe8323fe74d84b3950b53da17 (patch) | |
tree | ddfd2afb08bf94b300eecee7cfef3394ed8c1092 /lib/libalpm/conflict.c | |
parent | c885a953eb888004f0302ed3eceafef93e2f072f (diff) | |
download | pacman-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/conflict.c')
-rw-r--r-- | lib/libalpm/conflict.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index fe182094..5d279536 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -409,7 +409,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, numtargs, current); /* CHECK 1: check every target against every target */ _alpm_log(handle, ALPM_LOG_DEBUG, "searching for file conflicts: %s\n", - alpm_pkg_get_name(p1)); + p1->name); for(j = i->next; j; j = j->next) { alpm_list_t *common_files; alpm_pkg_t *p2 = j->data; @@ -422,8 +422,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, for(k = common_files; k; k = k->next) { snprintf(path, PATH_MAX, "%s%s", handle->root, (char *)k->data); conflicts = add_fileconflict(handle, conflicts, - ALPM_FILECONFLICT_TARGET, path, - alpm_pkg_get_name(p1), alpm_pkg_get_name(p2)); + ALPM_FILECONFLICT_TARGET, path, p1->name, p2->name); if(handle->pm_errno == ALPM_ERR_MEMORY) { FREELIST(conflicts); FREELIST(common_files); |