From c4bd476ad13e142fe8323fe74d84b3950b53da17 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 17 Aug 2011 23:25:19 -0500 Subject: 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 --- lib/libalpm/conflict.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/conflict.c') 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); -- cgit v1.2.3-54-g00ecf