mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -05:00
Small handle related cleanups
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
0074cadb3b
commit
ba63e31cc7
@ -92,8 +92,7 @@ static size_t _package_changelog_read(void *ptr, size_t size,
|
|||||||
ssize_t sret = archive_read_data((struct archive *)fp, ptr, size);
|
ssize_t sret = archive_read_data((struct archive *)fp, ptr, size);
|
||||||
/* Report error (negative values) */
|
/* Report error (negative values) */
|
||||||
if(sret < 0) {
|
if(sret < 0) {
|
||||||
pkg->handle->pm_errno = PM_ERR_LIBARCHIVE;
|
RET_ERR(pkg->handle, PM_ERR_LIBARCHIVE, 0);
|
||||||
return 0;
|
|
||||||
} else {
|
} else {
|
||||||
return (size_t)sret;
|
return (size_t)sret;
|
||||||
}
|
}
|
||||||
|
@ -341,8 +341,7 @@ alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg)
|
|||||||
|
|
||||||
if(pkg->origin == PKG_FROM_FILE) {
|
if(pkg->origin == PKG_FROM_FILE) {
|
||||||
/* The sane option; search locally for things that require this. */
|
/* The sane option; search locally for things that require this. */
|
||||||
db = alpm_option_get_localdb(pkg->handle);
|
find_requiredby(pkg, pkg->handle->db_local, &reqs);
|
||||||
find_requiredby(pkg, db, &reqs);
|
|
||||||
} else {
|
} else {
|
||||||
/* We have a DB package. if it is a local package, then we should
|
/* We have a DB package. if it is a local package, then we should
|
||||||
* only search the local DB; else search all known sync databases. */
|
* only search the local DB; else search all known sync databases. */
|
||||||
|
@ -275,7 +275,7 @@ static int compute_download_size(pmpkg_t *newpkg)
|
|||||||
off_t dltsize;
|
off_t dltsize;
|
||||||
off_t pkgsize = alpm_pkg_get_size(newpkg);
|
off_t pkgsize = alpm_pkg_get_size(newpkg);
|
||||||
|
|
||||||
dltsize = _alpm_shortest_delta_path(newpkg->handle,
|
dltsize = _alpm_shortest_delta_path(handle,
|
||||||
alpm_pkg_get_deltas(newpkg),
|
alpm_pkg_get_deltas(newpkg),
|
||||||
alpm_pkg_get_filename(newpkg),
|
alpm_pkg_get_filename(newpkg),
|
||||||
&newpkg->delta_path);
|
&newpkg->delta_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user